R.optional

This commit is contained in:
2021-10-29 22:33:59 -04:00
parent 654f5fb4dd
commit cff42ea42d

View File

@@ -40,6 +40,9 @@
(true
(for _ (range (- max min)) (oneOf expr "")))))))
(function :String optional [:String expr]
(repeat expr 0 1))
// TODO could memoize compiled regexes
(function :Null<RMatch> match [:String regex :String textToSearch &opt :String flags]
(#if hxnodejs