{"author":{"name":"Andrey Tarantsov","email":"andreyvit@me.com"},"name":"json-diff","description":"JSON diff","version":"0.3.1","homepage":"https://github.com/andreyvit/json-diff","repository":{"url":"git@github.com:andreyvit/json-diff.git"},"main":"lib/index.js","bin":{"json-diff":"bin/json-diff.js"},"scripts":{"test":"./node_modules/mocha/bin/mocha","cov":"rm -rf lib-cov; jscoverage lib lib-cov; env JSLIB=lib-cov mocha -R dot && env JSLIB=lib-cov mocha -R html-cov >coverage.html; open coverage.html"},"dependencies":{"dreamopt":"~0.6.0","difflib":"~0.2.1","cli-color":"~0.1.6"},"devDependencies":{"mocha":"~1.7.0"},"optionalDependencies":{},"engines":{"node":"*"},"readme":"JSON structural diff\n====================\n\nDoes exactly what you think it does:\n\n![Screenshot](https://github.com/andreyvit/json-diff/raw/master/doc/screenshot.png)\n\n\nInstallation\n------------\n\n    npm install json-diff\n\n\nUsage\n-----\n\nSimple:\n\n    json-diff a.json b.json\n\nDetailed:\n\n    % json-diff --help\n    Usage: json-diff [-vjC] first.json second.json\n\n    Arguments:\n      first.json            Old file\n      second.json           New file\n\n    General options:\n      -v, --verbose         Output progress info\n      -C, --[no-]color      Colored output\n      -j, --raw-json        Display raw JSON encoding of the diff\n      -h, --help            Display this usage information\n\n\nFeatures\n--------\n\n* colorized, diff-like output\n* fuzzy matching of modified array elements (when array elements are object hierarchies)\n* reasonable test coverage (far from 100%, though)\n\n\nTests\n-----\n\nRun:\n\n    npm test\n\nTest coverage report:\n\n    npm run-script cov\n\nOutput:\n\n    colorize\n      ✓ should return ' <value>' for a scalar value\n      ✓ should return '-<old value>', '+<new value>' for a scalar diff\n      ✓ should return '-<removed key>: <removed value>' for an object diff with a removed key\n      ✓ should return '+<added key>: <added value>' for an object diff with an added key\n      ✓ should return '+<added key>: <added stringified value>' for an object diff with an added key and a non-scalar value\n      ✓ should return ' <modified key>: <colorized diff>' for an object diff with a modified key\n      ✓ should return '+<inserted item>' for an array diff\n      ✓ should return '-<deleted item>' for an array diff\n\n    diff\n      with simple scalar values\n        ✓ should return undefined for two identical numbers\n        ✓ should return undefined for two identical strings\n        ✓ should return { __old: <old value>, __new: <new value> } object for two different numbers\n      with objects\n        ✓ should return undefined for two objects with identical contents\n        ✓ should return undefined for two object hierarchies with identical contents\n        ✓ should return { <key>__deleted: <old value> } when the second object is missing a key\n        ✓ should return { <key>__added: <new value> } when the first object is missing a key\n        ✓ should return { <key>: { __old: <old value>, __new: <new value> } } for two objects with diffent scalar values for a key\n        ✓ should return { <key>: <diff> } with a recursive diff for two objects with diffent values for a key\n      with arrays of scalars\n        ✓ should return undefined for two arrays with identical contents\n        ✓ should return [..., ['-', <removed item>], ...] for two arrays when the second array is missing a value\n        ✓ should return [..., ['+', <added item>], ...] for two arrays when the second one has an extra value\n        ✓ should return [..., ['+', <added item>]] for two arrays when the second one has an extra value at the end (edge case test)\n      with arrays of objects\n        ✓ should return undefined for two arrays with identical contents\n        ✓ should return [..., ['-', <removed item>], ...] for two arrays when the second array is missing a value\n        ✓ should return [..., ['+', <added item>], ...] for two arrays when the second array has an extra value\n        ✓ should return [..., ['~', <diff>], ...] for two arrays when an item has been modified (note: involves a crazy heuristic)\n\n    ✔ 25 tests complete (12ms)\n\n\nLicense\n-------\n\n© Andrey Tarantsov. Distributed under the MIT license.\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/andreyvit/json-diff/issues"},"_id":"json-diff@0.3.1","_shasum":"6dbc3ae2d25e075a7fd71bcd9874458666fb681b","_from":"https://registry.npmjs.org/json-diff/-/json-diff-0.3.1.tgz","_resolved":"https://registry.npmjs.org/json-diff/-/json-diff-0.3.1.tgz"}