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

Method appendRight

benchmark/data.js:317–327  ·  view source on GitHub ↗
(index, content)

Source from the content-addressed store, hash-verified

315 return this;
316 }
317 appendRight(index, content) {
318 if (typeof content !== 'string') throw new TypeError('inserted content must be a string');
319 this._split(index);
320 const chunk = this.byStart[index];
321 if (chunk) {
322 chunk.appendRight(content);
323 } else {
324 this.outro += content;
325 }
326 return this;
327 }
328 clone() {
329 const cloned = new MagicString(this.original, { filename: this.filename });
330 let originalChunk = this.firstChunk;

Callers

nothing calls this directly

Calls 2

_splitMethod · 0.95
appendRightMethod · 0.45

Tested by

no test coverage detected