MCPcopy
hub / github.com/flightcontrolhq/superjson / addIdentity

Function addIdentity

src/plainer.ts:125–133  ·  view source on GitHub ↗
(object: any, path: any[], identities: Map<any, any[][]>)

Source from the content-addressed store, hash-verified

123 isInstanceOfRegisteredClass(object, superJson);
124
125function addIdentity(object: any, path: any[], identities: Map<any, any[][]>) {
126 const existingSet = identities.get(object);
127
128 if (existingSet) {
129 existingSet.push(path);
130 } else {
131 identities.set(object, [path]);
132 }
133}
134
135interface Result {
136 transformedValue: any;

Callers 1

walkerFunction · 0.85

Calls 1

setMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…