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

Method insertLeft

src/MagicString.ts:453–462  ·  view source on GitHub ↗

@internal

(index: number, content: string)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

appendLeftMethod · 0.95

Tested by

no test coverage detected