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

Method append

src/MagicString.ts:210–217  ·  view source on GitHub ↗

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

(content: string)

Source from the content-addressed store, hash-verified

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