node-document-differ-jsondiff
v0.1.0
Published
Differ adapter `json-diff` for `node-document` ODM for Node.js.
Downloads
25
Readme
NODE-DOCUMENT-DIFFER-JSONDIFF
Differ adapter json-diff for node-document ODM for Node.js.
Installation
$ npm install node-document-differ-jsondiff
Usage
Basic:
var Differ = require('node-document-differ-jsondiff');
var differ = new Differ();
var a = {foo: 1, bar: "baz"},
b = {foo: 2, baz: "qux"};
differ.diff(a, b, function(err, diff, identical) {
console.log("Equal: %s \nDiff:\n", identical, diff);
});
For details; see node-document.
Test
Local tests:
$ make test
License
Released under the MIT license.
Copyright (c) Jonas Grimfelt