MCPcopy Create free account
hub / github.com/ampproject/amphtml / matchIterator

Function matchIterator

build-system/server/app-index/regex.js:6–12  ·  view source on GitHub ↗

* * @param {RegExp} regex * @param {string} subject

(regex, subject)

Source from the content-addressed store, hash-verified

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

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected