A simple Trie implementation for Node.js.
JavaScript HTML
Latest commit 5364bd4 May 10, 2016 @jeresig Merge pull request #8 from benox3/master
Sort `words` before building trie
Permalink
Failed to load latest commit information.
dict Add in tests for succinct trie and binary search string. Mar 22, 2011
vendor Update to Benchmark.js 0.1.348. Mar 18, 2011
.gitmodules Use Benchmark.js for performance testing. Mar 17, 2011
Bits.js Change the ORD() function to an object for faster lookups, based upon… Mar 23, 2011
README.md Mention the blog post on JavaScript Trie Performance Analysis in the … Mar 18, 2011
build-trie.js Sort `words` before building trie May 10, 2016
dump-trie.js Pulling in the initial work and tests. Mar 16, 2011
load.html Fix rogue endline that snuck through the build process. Mar 17, 2011
lookup.html Add a simple test for checking the lookup time of a Succinctly-stored… Mar 22, 2011
test-build-binary.js Add in tests for succinct trie and binary search string. Mar 22, 2011
test-build-dummy.js Add in tests for succinct trie and binary search string. Mar 22, 2011
test-build-hash.js Add in tests for succinct trie and binary search string. Mar 22, 2011
test-build-string.js Add in tests for succinct trie and binary search string. Mar 22, 2011
test-build-succinct.js Add in tests for succinct trie and binary search string. Mar 22, 2011
test-build-trie.js Add in tests for succinct trie and binary search string. Mar 22, 2011
test-find-binary.js Add in tests for succinct trie and binary search string. Mar 22, 2011
test-find-hash.js Add in tests for succinct trie and binary search string. Mar 22, 2011
test-find-string.js Add in tests for succinct trie and binary search string. Mar 22, 2011
test-find-succinct.js Add in tests for succinct trie and binary search string. Mar 22, 2011
test-find-trie.js Fix finding repeated word bug May 11, 2014
util.js Fix finding repeated word bug May 11, 2014

README.md

A Simple JavaScript Trie Generator

By John Resig

Copyright 2011 John Resig
MIT Licensed

All code is designed to work in Node.js.

To clone this repository including the Benchmark.js submodule:

git clone --recursive https://github.com/jeresig/trie-js.git

To build an optimized Trie run:

node build-trie.js > dict/suffix.js

To dump a full dictionary of words from the Trie do:

node dump-trie.js

A sample function for finding a word in the Trie can be see in util.js, named findTrieWord.