Skip to content

🌴 Radix tree data structure implemented in JavaScript

License

Notifications You must be signed in to change notification settings

garnetius/radix-tree-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RadixTree JS

License: MIT

Idiomatic implementation of the Radix trie data structure that can function as a drop-in replacement for Map and comes with built-in converter to RegExp regular expression. E.g.:

new RadixTree(["zbxad", "zcrad", "zbad", "zad", "ad", "z"]).toString()

Produces neat:

z((cr)?ad|bx?ad)?|ad

Unlike Map, the keys can only be strings though, but this should come as fairly obvious.

Releases

No releases published

Packages

No packages published