Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 367 Bytes

readme.md

File metadata and controls

16 lines (11 loc) · 367 Bytes

Usage

let Trie = require("simple-trie-js");

let trie = new Trie();

trie.add_word("hello");
trie.add_word("world");

console.log(trie.search_word("hello") ? "Found!" : "Not Found!");
console.log(trie.search_word("hell") ? "Found!" : "Not Found!");

trie.delete_word("hello");
console.log(trie.search_word("hello") ? "Found!" : "Not Found!");