MCPcopy
hub / github.com/yjs/yjs / delete

Method delete

src/ytype.js:1233–1235  ·  view source on GitHub ↗

* Deletes elements starting from an index. * * @param {number} index Index at which to start deleting elements * @param {number} length The number of elements to remove. Defaults to 1.

(index, length = 1)

Source from the content-addressed store, hash-verified

1231 * @param {number} length The number of elements to remove. Defaults to 1.
1232 */
1233 delete (index, length = 1) {
1234 this.applyDelta(delta.create().retain(index).delete(length))
1235 }
1236
1237 /**
1238 * Returns the i-th element from a YArray.

Callers 15

formatTextMethod · 0.45
insertNegatedAttributesFunction · 0.45
updateCurrentAttributesFunction · 0.45
deleteTextFunction · 0.45
toDeltaMethod · 0.45
typeListDeleteFunction · 0.45
typeMapDeleteFunction · 0.45
testLengthIssueFunction · 0.45
testLengthIssue2Function · 0.45
testDeleteInsertFunction · 0.45
testDeletionsInLateSyncFunction · 0.45

Calls 1

applyDeltaMethod · 0.95

Tested by

no test coverage detected