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

Function updateCurrentAttributes

src/ytype.js:222–229  ·  view source on GitHub ↗
(currentAttributes, format)

Source from the content-addressed store, hash-verified

220 * @function
221 */
222const updateCurrentAttributes = (currentAttributes, format) => {
223 const { key, value } = format
224 if (value === null) {
225 currentAttributes.delete(key)
226 } else {
227 currentAttributes.set(key, value)
228 }
229}
230
231/**
232 * @param {ItemTextListPosition} currPos

Callers 1

forwardMethod · 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…