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

Method insertRight

src/MagicString.ts:467–476  ·  view source on GitHub ↗

@internal

(index: number, content: string)

Source from the content-addressed store, hash-verified

465
466 /** @internal */
467 insertRight(index: number, content: string): this {
468 if (!warned.insertRight) {
469 console.warn(
470 'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead',
471 )
472 warned.insertRight = true
473 }
474
475 return this.prependRight(index, content)
476 }
477
478 /**
479 * 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