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

Method replacer

benchmark/data.js:411–415  ·  view source on GitHub ↗
(match)

Source from the content-addressed store, hash-verified

409 }
410 let shouldIndentNextCharacter = options.indentStart !== false;
411 const replacer = (match) => {
412 if (shouldIndentNextCharacter) return `${indentStr}${match}`;
413 shouldIndentNextCharacter = true;
414 return match;
415 };
416 this.intro = this.intro.replace(pattern, replacer);
417 let charIndex = 0;
418 let chunk = this.firstChunk;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected