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

Method matchAll

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

Source from the content-addressed store, hash-verified

1151 }
1152 }
1153 function matchAll(re: RegExp, str: string): RegExpExecArray[] {
1154 const matches = []
1155 while (true) {
1156 const match = re.exec(str)
1157 if (!match)
1158 break
1159
1160 matches.push(match)
1161 }
1162 return matches
1163 }
1164 if (searchValue.global) {
1165 const matches = matchAll(searchValue, this.original)
1166 matches.forEach((match) => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected