Skip to content

jdavidw13/jstrie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

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

No packages published