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

Method append

src/MagicString.ts:118–125  ·  view source on GitHub ↗

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

(content: string)

Source from the content-addressed store, hash-verified

116 * Appends the specified content to the end of the string.
117 */
118 append(content: string): this {
119 if (typeof content !== 'string') {
120 throw new MagicStringError(`content must be a string, got ${typeof content}`)
121 }
122
123 this.outro += content
124 return this
125 }
126
127 /**
128 * 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