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

Method insertRight

src/MagicString.ts:587–596  ·  view source on GitHub ↗

@internal

(index: number, content: string)

Source from the content-addressed store, hash-verified

585
586 /** @internal */
587 insertRight(index: number, content: string): this {
588 if (!warned.insertRight) {
589 console.warn(
590 'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead',
591 )
592 warned.insertRight = true
593 }
594
595 return this.prependRight(index, content)
596 }
597
598 /**
599 * Moves the characters from `start` and `end` to `index`.

Callers

nothing calls this directly

Calls 1

prependRightMethod · 0.95

Tested by

no test coverage detected