aogriffiths / jsondiff-js

A JavaScript implementation to create json patches of the JSON Media Type for partial modifications: http://tools.ietf.org/html/draft-ietf-appsawg-json-patch-08. See also https://github.com/bruth/jsonpatch-js.
https://github.com/aogriffiths/jsondiff-js
BSD 2-Clause "Simplified" License
23 stars 11 forks source link

Broken in browser #9

Open decatur opened 10 years ago

decatur commented 10 years ago

The code assings windowto window.jsondiff. To fix, replace the line

return root.jsondiff = factory(root, {})

by

return root.jsondiff = factory(root, {}).diff;
decatur commented 10 years ago

The rewrite at https://github.com/andreas-gruenbacher/json-diff works for me so far.