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

Method insertLeft

src/MagicString.ts:455–464  ·  view source on GitHub ↗

@internal

(index: number, content: string)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

appendLeftMethod · 0.95

Tested by

no test coverage detected