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

Method matchAll

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected