mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-28 17:41:54 +08:00
Perf: use tldts-experimental when possible
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { fetchRemoteTextByLine } from './fetch-text-by-line';
|
||||
import { parse } from 'tldts';
|
||||
import { parse as tldtsParse } from 'tldts';
|
||||
|
||||
const isDomainLoose = (domain: string): boolean => {
|
||||
const { isIcann, isPrivate, isIp } = parse(domain);
|
||||
const { isIcann, isPrivate, isIp } = tldtsParse(domain);
|
||||
return !!(!isIp && (isIcann || isPrivate));
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user