mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-29 01:51:52 +08:00
Chore: Housekeeping & Make ESLint Happy
This commit is contained in:
@@ -34,9 +34,7 @@ const deepTrieNodeToJSON = (
|
||||
return obj;
|
||||
};
|
||||
|
||||
const createNode = <Meta = any>(parent: TrieNode | null = null): TrieNode => {
|
||||
return [false, parent, new Map<string, TrieNode>(), null] as TrieNode<Meta>;
|
||||
};
|
||||
const createNode = <Meta = any>(parent: TrieNode | null = null): TrieNode => [false, parent, new Map<string, TrieNode>(), null] as TrieNode<Meta>;
|
||||
|
||||
export const hostnameToTokens = (hostname: string): string[] => {
|
||||
const tokens = hostname.split('.');
|
||||
@@ -227,9 +225,7 @@ export const createTrie = <Meta = any>(from?: string[] | Set<string> | null, smo
|
||||
return { node, parent };
|
||||
};
|
||||
|
||||
const contains = (suffix: string): boolean => {
|
||||
return walkIntoLeafWithSuffix(suffix) !== null;
|
||||
};
|
||||
const contains = (suffix: string): boolean => walkIntoLeafWithSuffix(suffix) !== null;
|
||||
|
||||
const walk = (
|
||||
onMatches: (suffix: string[], meta: Meta) => void,
|
||||
|
||||
Reference in New Issue
Block a user