MCPcopy Create free account
hub / github.com/11cafe/comfyui-workspace-manager / array2Map

Function array2Map

ui/src/utils/deepJsonDiffCheck.ts:8–18  ·  view source on GitHub ↗
(map: any, obj: any)

Source from the content-addressed store, hash-verified

6 let equal = JSON.stringify(oldData) === JSON.stringify(newData);
7 if (equal) {
8 const array2Map = (map: any, obj: any) => {
9 const oldOrder = obj["order"];
10 const oldPos = obj["pos"];
11 delete obj["order"];
12 delete obj["pos"];
13 map.set(obj["id"], JSON.stringify(obj));
14 map.set(obj["id"] + "_pos", oldPos);
15 obj["order"] = oldOrder;
16 obj["pos"] = oldPos;
17 return map;
18 };
19 const withoutDeviation = (a: any, b: any, c: any) => {
20 return Math.abs(a - b) > c;
21 };

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected