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

Method insertLeft

src/MagicString.ts:456–465  ·  view source on GitHub ↗

@internal

(index: number, content: string)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

appendLeftMethod · 0.95

Tested by

no test coverage detected