* * @param {RegExp} regex * @param {string} subject
(regex, subject)
| 4 | * @param {string} subject |
| 5 | */ |
| 6 | function* matchIterator(regex, subject) { |
| 7 | let match = regex.exec(subject); |
| 8 | while (match != null) { |
| 9 | yield match; |
| 10 | match = regex.exec(subject); |
| 11 | } |
| 12 | } |
| 13 | |
| 14 | module.exports = {matchIterator}; |
no outgoing calls
no test coverage detected