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

Method split

tests/fuzz/edit-model.ts:34–40  ·  view source on GitHub ↗
(index: number)

Source from the content-addressed store, hash-verified

32 }
33
34 split(index: number): void {
35 if (this.boundaries.has(index))
36 return
37 if (this.isInsideHolder(index))
38 throw new EditModelError('cannot split a chunk that has already been edited')
39 this.boundaries.add(index)
40 }
41
42 append(content: string): void {
43 this.right[this.original.length] += content

Callers 9

appendLeftMethod · 0.95
prependLeftMethod · 0.95
appendRightMethod · 0.95
prependRightMethod · 0.95
removeMethod · 0.95
updateMethod · 0.95
resetMethod · 0.95
indent.test.tsFile · 0.45

Calls 3

isInsideHolderMethod · 0.95
hasMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected