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

Method insertLeft

src/MagicString.ts:565–574  ·  view source on GitHub ↗

@internal

(index: number, content: string)

Source from the content-addressed store, hash-verified

563
564 /** @internal */
565 insertLeft(index: number, content: string): this {
566 if (!warned.insertLeft) {
567 console.warn(
568 'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead',
569 )
570 warned.insertLeft = true
571 }
572
573 return this.appendLeft(index, content)
574 }
575
576 /** @internal */
577 insertRight(index: number, content: string): this {

Callers

nothing calls this directly

Calls 1

appendLeftMethod · 0.95

Tested by

no test coverage detected