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

Method prepend

src/MagicString.ts:653–659  ·  view source on GitHub ↗

* Prepends the string with the specified content.

(content: string)

Source from the content-addressed store, hash-verified

651 * Prepends the string with the specified content.
652 */
653 prepend(content: string): this {
654 if (typeof content !== 'string')
655 throw new TypeError('outro content must be a string')
656
657 this.intro = content + this.intro
658 return this
659 }
660
661 /**
662 * 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