Have you considered using JSON Patch? It’s more efficient when it comes to patch size.
> require('patcher').computePatch([1,2,3,4,5], [2,3,4,5])
{ '0': 2,
'1': 3,
'2': 4,
'3': 5,
'$r': 4 }
JSON Patch using remove operation:
It also has handy add, move, and replace operations.
https://github.com/bruth/jsonpatch-js is a partial implementation (applies patches, doesn’t yet generate them).
Have you considered using JSON Patch? It’s more efficient when it comes to patch size.
JSON Patch using remove operation:
It also has handy add, move, and replace operations.
https://github.com/bruth/jsonpatch-js is a partial implementation (applies patches, doesn’t yet generate them).