Treats the string keys of tree
as regular expressions.
// regExpKeys.ori
regExpKeys({
"^[0-9]+$": "digits"
"^[a-zA-Z]+$": "letters"
"^": "other"
})
This can be used to match against the regular expressions:
$ ori regExpKeys.ori/abc
letters
$ ori regExpKeys.ori/123
digits
$ ori regExpKeys.ori/__
other
You can use regExpKeys
with tree:filter
to filter values based on regular expression matches.