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

Method clone

src/Chunk.ts:48–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46 }
47
48 clone(): Chunk {
49 const chunk = new Chunk(this.start, this.end, this.original)
50
51 chunk.intro = this.intro
52 chunk.outro = this.outro
53 chunk.content = this.content
54 chunk.storeName = this.storeName
55 chunk.edited = this.edited
56
57 return chunk
58 }
59
60 contains(index: number): boolean {
61 return this.start < index && index < this.end

Callers 2

Bundle.test.tsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected