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

Method insertLeft

src/MagicString.ts:575–584  ·  view source on GitHub ↗

@internal

(index: number, content: string)

Source from the content-addressed store, hash-verified

573
574 /** @internal */
575 insertLeft(index: number, content: string): this {
576 if (!warned.insertLeft) {
577 console.warn(
578 'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead',
579 )
580 warned.insertLeft = true
581 }
582
583 return this.appendLeft(index, content)
584 }
585
586 /** @internal */
587 insertRight(index: number, content: string): this {

Callers

nothing calls this directly

Calls 1

appendLeftMethod · 0.95

Tested by

no test coverage detected