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

Method insertLeft

src/MagicString.ts:570–579  ·  view source on GitHub ↗

@internal

(index: number, content: string)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

appendLeftMethod · 0.95

Tested by

no test coverage detected