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

Method prepend

src/MagicString.ts:652–658  ·  view source on GitHub ↗

* Prepends the string with the specified content.

(content: string)

Source from the content-addressed store, hash-verified

650 * Prepends the string with the specified content.
651 */
652 prepend(content: string): this {
653 if (typeof content !== 'string')
654 throw new TypeError('outro content must be a string')
655
656 this.intro = content + this.intro
657 return this
658 }
659
660 /**
661 * Same as `s.appendLeft(...)`, except that the inserted content will go *before* any previous appends or prepends at index

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected