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

Method append

src/MagicString.ts:121–128  ·  view source on GitHub ↗

* Appends the specified content to the end of the string.

(content: string)

Source from the content-addressed store, hash-verified

119 * Appends the specified content to the end of the string.
120 */
121 append(content: string): this {
122 if (typeof content !== 'string') {
123 throw new MagicStringError(`content must be a string, got ${typeof content}`)
124 }
125
126 this.outro += content
127 return this
128 }
129
130 /**
131 * Appends the specified content at the index in the original string.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected