mirror of
https://github.com/SukkaW/Surge.git
synced 2026-02-03 20:41:52 +08:00
Perf: use new hostname trie
This commit is contained in:
@@ -3,7 +3,7 @@ import { createTrie } from './trie';
|
||||
export function domainDeduper(inputDomains: string[], toArray?: true): string[];
|
||||
export function domainDeduper(inputDomains: string[], toArray: false): Set<string>;
|
||||
export function domainDeduper(inputDomains: string[], toArray = true): string[] | Set<string> {
|
||||
const trie = createTrie(inputDomains);
|
||||
const trie = createTrie(inputDomains, true);
|
||||
const sets = new Set(inputDomains);
|
||||
|
||||
for (let i = 0, len1 = inputDomains.length; i < len1; i++) {
|
||||
|
||||
Reference in New Issue
Block a user