MCPcopy Create free account
hub / github.com/share/sharedb / getMapResult

Function getMapResult

lib/agent.js:609–623  ·  view source on GitHub ↗
(snapshotMap)

Source from the content-addressed store, hash-verified

607}
608
609function getMapResult(snapshotMap) {
610 var data = Object.create(null);
611 for (var id in snapshotMap) {
612 var mapValue = snapshotMap[id];
613 // fetchBulk / subscribeBulk map data can have either a Snapshot or an object
614 // `{error: Error | string}` as a value.
615 if (mapValue.error) {
616 // Transform errors to serialization-friendly objects.
617 data[id] = {error: getReplyErrorObject(mapValue.error)};
618 } else {
619 data[id] = getSnapshotData(mapValue);
620 }
621 }
622 return {data: data};
623}
624
625function getSnapshotData(snapshot) {
626 var data = {

Callers 1

agent.jsFile · 0.85

Calls 2

getReplyErrorObjectFunction · 0.85
getSnapshotDataFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…