Chore: minor changes

This commit is contained in:
SukkaW 2025-04-06 22:04:11 +08:00
parent 257499f5e8
commit acad137167
2 changed files with 4 additions and 2 deletions

View File

@ -6,6 +6,7 @@ import { dummySpan, printTraceResult } from '../trace';
import type { Span } from '../trace';
import { appendArrayInPlaceCurried } from './append-array-in-place';
import { PHISHING_DOMAIN_LISTS_EXTRA, PHISHING_HOSTS_EXTRA } from '../constants/reject-data-source';
import type { TldTsParsed } from './normalize-domain';
const downloads = [
...PHISHING_DOMAIN_LISTS_EXTRA.map(entry => processDomainListsWithPreload(...entry)),
@ -43,6 +44,7 @@ const pool = new Worktank({
let tld: string | null = '';
let apexDomain: string | null = '';
let subdomain: string | null = '';
let parsed: TldTsParsed;
// const set = new Set<string>();
// let duplicateCount = 0;
@ -56,7 +58,7 @@ const pool = new Worktank({
// set.add(line);
// }
const parsed = tldts.parse(line, loosTldOptWithPrivateDomains);
parsed = tldts.parse(line, loosTldOptWithPrivateDomains);
if (parsed.isPrivate) {
continue;
}

View File

@ -5,7 +5,7 @@ import tldts from 'tldts';
import { normalizeTldtsOpt } from '../constants/loose-tldts-opt';
import { isProbablyIpv4, isProbablyIpv6 } from 'foxts/is-probably-ip';
type TldTsParsed = ReturnType<typeof tldts.parse>;
export type TldTsParsed = ReturnType<typeof tldts.parse>;
/**
* Skipped the input non-empty check, the `domain` should not be empty.