Open
Description
I might be wrong but since T is a private property of CompactPrefixTree
, I'm not sure how the sample would work serializing JSON.stringify(trie.T)
and then retrieving the trie back . I would suggest instead something along the lines of :
const items = [
"http://www.example.com/foo/",
"https://www.example.com/baz/",
];
const trie = new CompactPrefixTree(items);
const serialized = JSON.stringify(trie);
// to deserialize
const trie2 = Object.assign(new CompactPrefixTree(),JSON.parse(serialized))
Metadata
Metadata
Assignees
Labels
No labels