Index: lib/coreUtils.js |
=================================================================== |
--- a/lib/coreUtils.js |
+++ b/lib/coreUtils.js |
@@ -50,8 +50,16 @@ |
} |
exports.findIndex = findIndex; |
function indexOf(iterable, searchElement) |
{ |
return findIndex(iterable, item => item === searchElement); |
} |
exports.indexOf = indexOf; |
+ |
+function* regExpIt(regExp, string) |
+{ |
+ let match = null; |
+ while (match = regExp.exec(string)) |
+ yield match; |
+} |
+exports.regExpIt = regExpIt; |