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

Method appendLeft

benchmark/data-min.js:256–261  ·  view source on GitHub ↗
(t, e)

Source from the content-addressed store, hash-verified

254 return ((this.outro += t), this);
255 }
256 appendLeft(t, e) {
257 if (typeof e != 'string') throw new TypeError('inserted content must be a string');
258 this._split(t);
259 const n = this.byEnd[t];
260 return (n ? n.appendLeft(e) : (this.intro += e), this);
261 }
262 appendRight(t, e) {
263 if (typeof e != 'string') throw new TypeError('inserted content must be a string');
264 this._split(t);

Callers 1

insertLeftMethod · 0.95

Calls 2

_splitMethod · 0.95
appendLeftMethod · 0.45

Tested by

no test coverage detected