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

Method matchAll

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

Source from the content-addressed store, hash-verified

1134 }
1135 }
1136 function matchAll(re: RegExp, str: string): RegExpExecArray[] {
1137 const matches = []
1138 while (true) {
1139 const match = re.exec(str)
1140 if (!match)
1141 break
1142
1143 matches.push(match)
1144 }
1145 return matches
1146 }
1147 if (searchValue.global) {
1148 const matches = matchAll(searchValue, this.original)
1149 matches.forEach((match) => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected