Clone of patricia-trie from https://github.com/rkapsi/patricia-trie