Skip to content

Latest commit

 

History

History
executable file
·
8 lines (7 loc) · 360 Bytes

README.md

File metadata and controls

executable file
·
8 lines (7 loc) · 360 Bytes

Retrie

JS port of @dankogai's RegexpTrie, written in Coco.

usage

RegExp('^' + Retrie(['a', 'ab', 'ac', 'd']))  //=> /^(?:a[bc]?|d)/
RegExp('^' + Retrie(['abcd'], true))          //=> /^a(?:b(?:cd?)?)?/