Trie implementation based on a minimal automaton for Node.js