MCPcopy Create free account
hub / github.com/cursorless-dev/cursorless / matchAll

Function matchAll

src/util/regex.ts:33–39  ·  view source on GitHub ↗
(
  text: string,
  regex: RegExp,
  mapfn: (v: RegExpMatchArray, k: number) => T
)

Source from the content-addressed store, hash-verified

31export const leftAnchored = makeCache(_leftAnchored);
32
33export function matchAll<T>(
34 text: string,
35 regex: RegExp,
36 mapfn: (v: RegExpMatchArray, k: number) => T
37) {
38 return Array.from(text.matchAll(regex), mapfn);
39}

Callers 2

tokenizeFunction · 0.90
getDelimiterPairOffsetsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected