MCPcopy
hub / github.com/yjs/yjs / updateCurrentAttributes

Function updateCurrentAttributes

src/utils/Transaction.js:338–344  ·  view source on GitHub ↗
(currentAttributes, { key, value })

Source from the content-addressed store, hash-verified

336 * @function
337 */
338const updateCurrentAttributes = (currentAttributes, { key, value }) => {
339 if (value === null) {
340 currentAttributes.delete(key)
341 } else {
342 currentAttributes.set(key, value)
343 }
344}
345
346/**
347 * Call this function after string content has been deleted in order to

Callers 2

cleanupFormattingGapFunction · 0.70
cleanupYTextFormattingFunction · 0.70

Calls 1

deleteMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…