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

Method insertRight

src/MagicString.ts:577–586  ·  view source on GitHub ↗

@internal

(index: number, content: string)

Source from the content-addressed store, hash-verified

575
576 /** @internal */
577 insertRight(index: number, content: string): this {
578 if (!warned.insertRight) {
579 console.warn(
580 'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead',
581 )
582 warned.insertRight = true
583 }
584
585 return this.prependRight(index, content)
586 }
587
588 /**
589 * 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