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

Method insertLeft

src/MagicString.ts:459–468  ·  view source on GitHub ↗

@internal

(index: number, content: string)

Source from the content-addressed store, hash-verified

457
458 /** @internal */
459 insertLeft(index: number, content: string): this {
460 if (!warned.insertLeft) {
461 console.warn(
462 'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead',
463 )
464 warned.insertLeft = true
465 }
466
467 return this.appendLeft(index, content)
468 }
469
470 /** @internal */
471 insertRight(index: number, content: string): this {

Callers

nothing calls this directly

Calls 1

appendLeftMethod · 0.95

Tested by

no test coverage detected