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

Method clone

benchmark/data.js:34–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32 this.intro = this.intro + content;
33 }
34 clone() {
35 const chunk = new Chunk(this.start, this.end, this.original);
36 chunk.intro = this.intro;
37 chunk.outro = this.outro;
38 chunk.content = this.content;
39 chunk.storeName = this.storeName;
40 chunk.edited = this.edited;
41 return chunk;
42 }
43 contains(index) {
44 return this.start < index && index < this.end;
45 }

Callers 2

cloneMethod · 0.45
cloneMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected