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

Function createClientOp

lib/agent.js:985–994  ·  view source on GitHub ↗
(request, clientId)

Source from the content-addressed store, hash-verified

983};
984
985function createClientOp(request, clientId) {
986 // src can be provided if it is not the same as the current agent,
987 // such as a resubmission after a reconnect, but it usually isn't needed
988 var src = request.src || clientId;
989 // c, d, and m arguments are intentionally undefined. These are set later
990 return ('op' in request) ? new EditOp(src, request.seq, request.v, request.op, request.x) :
991 (request.create) ? new CreateOp(src, request.seq, request.v, request.create, request.x) :
992 (request.del) ? new DeleteOp(src, request.seq, request.v, request.del, request.x) :
993 undefined;
994}
995
996function shallowCopy(object) {
997 var out = {};

Callers 1

agent.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…