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

Method prependLeft

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

Source from the content-addressed store, hash-verified

557 return this;
558 }
559 prependLeft(index, content) {
560 if (typeof content !== 'string') throw new TypeError('inserted content must be a string');
561 this._split(index);
562 const chunk = this.byEnd[index];
563 if (chunk) {
564 chunk.prependLeft(content);
565 } else {
566 this.intro = content + this.intro;
567 }
568 return this;
569 }
570 prependRight(index, content) {
571 if (typeof content !== 'string') throw new TypeError('inserted content must be a string');
572 this._split(index);

Callers

nothing calls this directly

Calls 2

_splitMethod · 0.95
prependLeftMethod · 0.45

Tested by

no test coverage detected