-
Notifications
You must be signed in to change notification settings - Fork 0
jdavidw13/jstrie
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
jstrie is a simple library for creating trie trees. Check out tests.js for usage examples.
Quick Example:
var jstrie = require('./jstrie');
var trieTree = jstrie.buildTrie(['hello', 'help']);
// trieTree.h.e.l.l.o._$ and trieTree.h.e.l.p._$
// _$ denotes a word
jstrie.buildTrie(['bob'], trieTree);
// trieTree also has trieTree.b.o.b.$
var words = jstrie.getWords(trieTree);
// ['hello', 'help', 'bob']
words = jstrie.getWords(trieTree, 'h');
// ['hello', 'help']
words = jstrie.getWords(trieTree, 'bob');
// ['bob']
About
Simple Trie datastructure for Javascript.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published