MCPcopy Create free account
hub / github.com/Rich-Harris/magic-string / matchAll

Method matchAll

src/MagicString.ts:1179–1189  ·  view source on GitHub ↗
(re: RegExp, str: string)

Source from the content-addressed store, hash-verified

1177 }
1178 }
1179 function matchAll(re: RegExp, str: string): RegExpExecArray[] {
1180 const matches = []
1181 while (true) {
1182 const match = re.exec(str)
1183 if (!match)
1184 break
1185
1186 matches.push(match)
1187 }
1188 return matches
1189 }
1190 if (searchValue.global) {
1191 const matches = matchAll(searchValue, this.original)
1192 matches.forEach((match) => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected