Update Reject Data Source

This commit is contained in:
SukkaW
2025-01-30 18:46:37 +08:00
parent ea1acf1bd3
commit 4f0877690c
2 changed files with 14 additions and 1 deletions

View File

@@ -506,6 +506,16 @@ abstract class Triebase<Meta = any> {
public [util.inspect.custom](depth: number) {
return this.inspect(depth);
};
public merge(trie: Triebase<Meta>) {
const handleSuffix = (suffix: string[], subdomain: boolean, meta: Meta) => {
this.add(fastStringArrayJoin(suffix, '.'), subdomain, meta);
};
trie.walk(handleSuffix);
return this;
}
}
export class HostnameSmolTrie<Meta = any> extends Triebase<Meta> {