mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-29 01:51:52 +08:00
Update Reject Data Source
This commit is contained in:
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user