Update checked-in dependencies
This commit is contained in:
parent
4b72bef651
commit
dbb232a3d8
1389 changed files with 209949 additions and 542 deletions
39
node_modules/tldts-core/src/options.ts
generated
vendored
Normal file
39
node_modules/tldts-core/src/options.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
export interface IOptions {
|
||||
allowIcannDomains: boolean;
|
||||
allowPrivateDomains: boolean;
|
||||
detectIp: boolean;
|
||||
extractHostname: boolean;
|
||||
mixedInputs: boolean;
|
||||
validHosts: string[] | null;
|
||||
validateHostname: boolean;
|
||||
}
|
||||
|
||||
function setDefaultsImpl({
|
||||
allowIcannDomains = true,
|
||||
allowPrivateDomains = false,
|
||||
detectIp = true,
|
||||
extractHostname = true,
|
||||
mixedInputs = true,
|
||||
validHosts = null,
|
||||
validateHostname = true,
|
||||
}: Partial<IOptions>): IOptions {
|
||||
return {
|
||||
allowIcannDomains,
|
||||
allowPrivateDomains,
|
||||
detectIp,
|
||||
extractHostname,
|
||||
mixedInputs,
|
||||
validHosts,
|
||||
validateHostname,
|
||||
};
|
||||
}
|
||||
|
||||
const DEFAULT_OPTIONS = /*@__INLINE__*/ setDefaultsImpl({});
|
||||
|
||||
export function setDefaults(options?: Partial<IOptions>): IOptions {
|
||||
if (options === undefined) {
|
||||
return DEFAULT_OPTIONS;
|
||||
}
|
||||
|
||||
return /*@__INLINE__*/ setDefaultsImpl(options);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue