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

Method snip

benchmark/data.js:671–676  ·  view source on GitHub ↗
(start, end)

Source from the content-addressed store, hash-verified

669 return result;
670 }
671 snip(start, end) {
672 const clone = this.clone();
673 clone.remove(0, start);
674 clone.remove(end, clone.original.length);
675 return clone;
676 }
677 _split(index) {
678 if (this.byStart[index] || this.byEnd[index]) return;
679 let chunk = this.lastSearchedChunk;

Callers

nothing calls this directly

Calls 2

cloneMethod · 0.95
removeMethod · 0.45

Tested by

no test coverage detected