mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-29 01:51:52 +08:00
Chore: print gfwlist validation count
This commit is contained in:
@@ -23,10 +23,11 @@ type TrieNode<Meta = any> = [
|
||||
|
||||
function deepTrieNodeToJSON<Meta = unknown>(node: TrieNode,
|
||||
unpackMeta: ((meta?: Meta) => string) | undefined) {
|
||||
const obj: Record<string, unknown> = {};
|
||||
const obj: Record<string, unknown> = {
|
||||
['[start]']: getBit(node[0], START),
|
||||
['[subdomain]']: getBit(node[0], INCLUDE_ALL_SUBDOMAIN)
|
||||
};
|
||||
|
||||
obj['[start]'] = getBit(node[0], START);
|
||||
obj['[subdomain]'] = getBit(node[0], INCLUDE_ALL_SUBDOMAIN);
|
||||
if (node[4] != null) {
|
||||
if (unpackMeta) {
|
||||
obj['[meta]'] = unpackMeta(node[4]);
|
||||
@@ -278,12 +279,10 @@ abstract class Triebase<Meta = unknown> {
|
||||
) {
|
||||
const dfsImpl = withSort ? Triebase.dfsWithSort : Triebase.dfs;
|
||||
|
||||
const nodeStack: Array<TrieNode<Meta>> = [];
|
||||
nodeStack.push(initialNode);
|
||||
const nodeStack: Array<TrieNode<Meta>> = [initialNode];
|
||||
|
||||
// Resolving initial string (begin the start of the stack)
|
||||
const suffixStack: string[][] = [];
|
||||
suffixStack.push(initialSuffix);
|
||||
const suffixStack: string[][] = [initialSuffix];
|
||||
|
||||
let node: TrieNode<Meta> = initialNode;
|
||||
let r;
|
||||
|
||||
Reference in New Issue
Block a user