JavaScript implementation of Double-Array trie