Minor changes

This commit is contained in:
SukkaW
2024-01-14 00:44:46 +08:00
parent 75c9e084a9
commit 897a505c32
13 changed files with 106 additions and 113 deletions

View File

@@ -12,6 +12,7 @@ const sharedConfig2 = { allowPrivateDomains: true, detectIp: false };
export const parse = (domain: string) => cache.sync(domain, () => tldts.parse(domain, sharedConfig));
/** { allowPrivateDomains: true, detectIp: false } */
export const parse2 = (domain: string) => cache2.sync(domain, () => tldts.parse(domain, sharedConfig2));
export const parseWithoutDetectIp = parse2;
let gothillGetDomainCache: ReturnType<typeof createCache> | null = null;
export const createCachedGorhillGetDomain = (gorhill: PublicSuffixList) => {