MCPcopy
hub / github.com/yjs/yjs / map

Method map

src/ytype.js:1347–1349  ·  view source on GitHub ↗

* Returns an Array with the result of calling a provided function on every * child-element. * * @template M * @param {(child:delta.DeltaConfGetChildren |delta.DeltaConfGetText ,index:number)=>M} f Function that produces an element of the new Array * @return {Array } A ne

(f)

Source from the content-addressed store, hash-verified

1345 * callback function
1346 */
1347 map (f) {
1348 return this.toArray().map(f)
1349 }
1350
1351 /**
1352 * Executes a provided function once on every element of this YArray.

Callers 15

insertContentHelperFunction · 0.80
toJSONMethod · 0.80
toStringMethod · 0.80
getSubdocGuidsMethod · 0.80
mergeIdMapsFunction · 0.80
createIdMapFromIdSetFunction · 0.80
_ensureAttrsFunction · 0.80
logTypeFunction · 0.80
encodeStateAsUpdateV2Function · 0.80
mergeUpdatesV2Function · 0.80
createObfuscatorFunction · 0.80
mergeContentMapsFunction · 0.80

Calls 1

toArrayMethod · 0.95

Tested by

no test coverage detected