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

Method clone

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

Source from the content-addressed store, hash-verified

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

Callers 2

cloneMethod · 0.45
cloneMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected