feat(core): Introduce native implementations for Base64, random generation and normalization; remove runtime plugin dependencies; update tests, docs and package metadata
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import * as plugins from './smartstring.plugins.js';
|
||||
|
||||
export class Domain {
|
||||
public fullName: string;
|
||||
public level1: string;
|
||||
@@ -14,14 +12,14 @@ export class Domain {
|
||||
public domainName;
|
||||
public subDomain;
|
||||
public port;
|
||||
public nodeParsedUrl: plugins.url.UrlWithStringQuery;
|
||||
public nodeParsedUrl: URL;
|
||||
constructor(domainStringArg: string) {
|
||||
// lets do the node standard stuff first
|
||||
this.protocol = this._protocolRegex(domainStringArg);
|
||||
if (!this.protocol) {
|
||||
domainStringArg = `https://${domainStringArg}`;
|
||||
}
|
||||
this.nodeParsedUrl = plugins.url.parse(domainStringArg);
|
||||
this.nodeParsedUrl = new URL(domainStringArg);
|
||||
this.port = this.nodeParsedUrl.port;
|
||||
|
||||
// lets do the rest after
|
||||
|
Reference in New Issue
Block a user