Update dashboard, kb, memory +4 more (+28 ~18 -1)
This commit is contained in:
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);
|
||||
}
|
||||
Reference in New Issue
Block a user