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

Method insertLeft

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

@internal

(index: number, content: string)

Source from the content-addressed store, hash-verified

462
463 /** @internal */
464 insertLeft(index: number, content: string): this {
465 if (!warned.insertLeft) {
466 console.warn(
467 'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead',
468 )
469 warned.insertLeft = true
470 }
471
472 return this.appendLeft(index, content)
473 }
474
475 /** @internal */
476 insertRight(index: number, content: string): this {

Callers

nothing calls this directly

Calls 1

appendLeftMethod · 0.95

Tested by

no test coverage detected