Fast and memory efficient dictionary using Trie Structure.
This is a Node.js module available through the npm registry. Installation is done using the npm install
command:
$ npm install trie-dict
import TrieDict from "trie-dict";
const dict = TrieDict({ words: ["Trie", "dictionary"], caseSensitive: fasle });;
- default: `[]`
- type: `string[]`
The initial words to add the Trie.
- default: `true`
- type: `boolean`
Case sensitive dictionary.
Add new word
to the dictionary.
Check if word
exist in the dictionary.
Remove the word
from the dictionary if it exist.
Check if the dictionary has any word that starts with initial
.