node-trie
v0.0.1
Published
node-trie =========
Downloads
5
Readme
node-trie
A simple Trie implementation for Node.js
install
npm install node-trie
usage
var Trie = require('node-trie');
var trie = Trie();
var letters = [
'hello',
'world',
'help',
'中国'
];
for(var i = 0; i < letters.length; i++) {
trie.add(letters[i], letters[i]);
}
trie.get('hello'); //[ 'hello' ]
trie.get('h'); //[ 'hello', 'help' ]
trie.get('中'); //[ '中国' ]