MCPcopy Create free account
hub / github.com/Starcounter-Jack/JSON-Patch / getPatchesUsingCompare

Function getPatchesUsingCompare

test/spec/duplexSpec.mjs:28–33  ·  view source on GitHub ↗
(objFactory, objChanger)

Source from the content-addressed store, hash-verified

26}
27
28function getPatchesUsingCompare(objFactory, objChanger) {
29 const obj = objFactory();
30 const mirror = JSON.parse(JSON.stringify(obj));
31 objChanger(obj);
32 return jsonpatch.compare(mirror, JSON.parse(JSON.stringify(obj)));
33}
34
35const customMatchers = {
36 /**

Callers 1

duplexSpec.mjsFile · 0.85

Calls 2

objFactoryFunction · 0.85
objChangerFunction · 0.85

Tested by

no test coverage detected