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

Method append

src/MagicString.ts:206–213  ·  view source on GitHub ↗

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

(content: string)

Source from the content-addressed store, hash-verified

204 * Appends the specified content to the end of the string.
205 */
206 append(content: string): this {
207 if (typeof content !== 'string') {
208 throw new MagicStringError(`content must be a string, got ${typeof content}`)
209 }
210
211 this.outro += content
212 return this
213 }
214
215 /**
216 * 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