{"_id":"deeper","_rev":"129763","name":"deeper","description":"JavaScript \"deep equality\" / structural equality tester with Node.js flavor.","dist-tags":{"latest":"2.1.0"},"maintainers":[{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"time":{"modified":"2021-06-03T11:08:43.000Z","created":"2013-01-06T08:14:53.930Z","2.1.0":"2015-08-31T02:01:38.671Z","2.0.4":"2015-08-30T06:33:15.649Z","2.0.3":"2015-08-30T06:28:20.288Z","2.0.2":"2015-08-30T06:26:15.360Z","2.0.1":"2015-08-30T06:24:42.157Z","2.0.0":"2015-08-29T00:02:24.668Z","1.0.3":"2015-05-01T00:50:44.463Z","1.0.2":"2013-01-07T05:52:48.111Z","1.0.1":"2013-01-07T05:35:57.635Z","1.0.0":"2013-01-06T08:14:53.930Z"},"users":{"fgribreau":true,"timdp":true,"davetayls":true,"swttfam3":true},"author":{"name":"Forrest L Norvell","email":"ogd@aoaioxxysz.net","url":"https://github.com/othiym23"},"repository":{"type":"git","url":"git+https://github.com/othiym23/node-deeper.git"},"versions":{"2.1.0":{"name":"deeper","version":"2.1.0","description":"JavaScript \"deep equality\" / structural equality tester with Node.js flavor.","scripts":{"test":"standard && tap test/*.js --coverage"},"repository":{"type":"git","url":"git+https://github.com/othiym23/node-deeper.git"},"keywords":["deepEqual","structural","equality","assert","testing","tap"],"author":{"name":"Forrest L Norvell","email":"ogd@aoaioxxysz.net","url":"https://github.com/othiym23"},"license":"BSD-2-Clause","devDependencies":{"buffertools":"^2.1.3","standard":"^5.1.1","tap":"^1.3.2"},"gitHead":"160c71db6c9d14dc4484748d6c0e55c740e6ba1e","bugs":{"url":"https://github.com/othiym23/node-deeper/issues"},"homepage":"https://github.com/othiym23/node-deeper#readme","_id":"deeper@2.1.0","_shasum":"bc564e5f73174fdf201e08b00030e8a14da74368","_from":".","_npmVersion":"2.14.1","_nodeVersion":"2.5.0","_npmUser":{"name":"othiym23","email":"ogd@aoaioxxysz.net"},"dist":{"shasum":"bc564e5f73174fdf201e08b00030e8a14da74368","size":6772,"noattachment":false,"key":"/deeper/-/deeper-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/deeper/download/deeper-2.1.0.tgz"},"maintainers":[{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"directories":{},"publish_time":1440986498671,"_cnpm_publish_time":1440986498671,"_hasShrinkwrap":false},"2.0.4":{"name":"deeper","version":"2.0.4","description":"JavaScript \"deep equality\" / structural equality tester with Node.js flavor.","scripts":{"test":"standard && tap test/*.js --coverage"},"repository":{"type":"git","url":"git+https://github.com/othiym23/node-deeper.git"},"keywords":["deepEqual","structural","equality","assert","testing","tap"],"author":{"name":"Forrest L Norvell","email":"ogd@aoaioxxysz.net","url":"https://github.com/othiym23"},"license":"BSD-2-Clause","devDependencies":{"buffertools":"^2.1.3","standard":"^5.1.1","tap":"^1.3.2"},"gitHead":"04cb923a8b53d3da32abca486acf4b8e33eb83fa","bugs":{"url":"https://github.com/othiym23/node-deeper/issues"},"homepage":"https://github.com/othiym23/node-deeper#readme","_id":"deeper@2.0.4","_shasum":"53132877a31f91f13a8771f8e7f7394a0acb0160","_from":".","_npmVersion":"3.3.1","_nodeVersion":"2.5.0","_npmUser":{"name":"othiym23","email":"ogd@aoaioxxysz.net"},"dist":{"shasum":"53132877a31f91f13a8771f8e7f7394a0acb0160","size":6432,"noattachment":false,"key":"/deeper/-/deeper-2.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/deeper/download/deeper-2.0.4.tgz"},"maintainers":[{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"directories":{},"publish_time":1440916395649,"_cnpm_publish_time":1440916395649,"_hasShrinkwrap":false},"2.0.3":{"name":"deeper","version":"2.0.3","description":"JavaScript \"deep equality\" / structural equality tester with Node.js flavor.","scripts":{"test":"standard && tap test/*.js --coverage"},"repository":{"type":"git","url":"git+https://github.com/othiym23/node-deeper.git"},"keywords":["deepEqual","structural","equality","assert","testing","tap"],"author":{"name":"Forrest L Norvell","email":"ogd@aoaioxxysz.net","url":"https://github.com/othiym23"},"license":"BSD-2-Clause","devDependencies":{"buffertools":"^2.1.3","standard":"^5.1.1","tap":"^1.3.2"},"gitHead":"74708dee9053332ce1c9f76d30c7187096e2bead","bugs":{"url":"https://github.com/othiym23/node-deeper/issues"},"homepage":"https://github.com/othiym23/node-deeper#readme","_id":"deeper@2.0.3","_shasum":"4c7f94c31c49088835525d4c02af807ffc377857","_from":".","_npmVersion":"3.3.1","_nodeVersion":"2.5.0","_npmUser":{"name":"othiym23","email":"ogd@aoaioxxysz.net"},"dist":{"shasum":"4c7f94c31c49088835525d4c02af807ffc377857","size":6435,"noattachment":false,"key":"/deeper/-/deeper-2.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/deeper/download/deeper-2.0.3.tgz"},"maintainers":[{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"directories":{},"publish_time":1440916100288,"_cnpm_publish_time":1440916100288,"_hasShrinkwrap":false},"2.0.2":{"name":"deeper","version":"2.0.2","description":"JavaScript \"deep equality\" / structural equality tester with Node.js flavor.","scripts":{"test":"standard && tap test/*.js --coverage"},"repository":{"type":"git","url":"git+https://github.com/othiym23/node-deeper.git"},"keywords":["deepEqual","structural","equality","assert","testing","tap"],"author":{"name":"Forrest L Norvell","email":"ogd@aoaioxxysz.net","url":"https://github.com/othiym23"},"license":"BSD-2-Clause","devDependencies":{"buffertools":"^2.1.3","standard":"^5.1.1","tap":"^1.3.2"},"gitHead":"5d41df17b495472ca65874c755e7f0e43fa105b8","bugs":{"url":"https://github.com/othiym23/node-deeper/issues"},"homepage":"https://github.com/othiym23/node-deeper#readme","_id":"deeper@2.0.2","_shasum":"93443291b7d511953808c331e68f42d8de8e27bb","_from":".","_npmVersion":"3.3.1","_nodeVersion":"2.5.0","_npmUser":{"name":"othiym23","email":"ogd@aoaioxxysz.net"},"dist":{"shasum":"93443291b7d511953808c331e68f42d8de8e27bb","size":6433,"noattachment":false,"key":"/deeper/-/deeper-2.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/deeper/download/deeper-2.0.2.tgz"},"maintainers":[{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"directories":{},"publish_time":1440915975360,"_cnpm_publish_time":1440915975360,"_hasShrinkwrap":false},"2.0.1":{"name":"deeper","version":"2.0.1","description":"JavaScript \"deep equality\" / structural equality tester with Node.js flavor.","scripts":{"test":"standard && tap test/*.js --coverage"},"repository":{"type":"git","url":"git+https://github.com/othiym23/node-deeper.git"},"keywords":["deepEqual","structural","equality","assert","testing","tap"],"author":{"name":"Forrest L Norvell","email":"ogd@aoaioxxysz.net","url":"https://github.com/othiym23"},"license":"BSD-2-Clause","devDependencies":{"buffertools":"^2.1.3","standard":"^5.1.1","tap":"^1.3.2"},"gitHead":"ca3b021dbfaae71a8deffb2b675f91bb6a29ac93","bugs":{"url":"https://github.com/othiym23/node-deeper/issues"},"homepage":"https://github.com/othiym23/node-deeper#readme","_id":"deeper@2.0.1","_shasum":"d549534374751e29f375822777d007a3403cf4d5","_from":".","_npmVersion":"3.3.1","_nodeVersion":"2.5.0","_npmUser":{"name":"othiym23","email":"ogd@aoaioxxysz.net"},"dist":{"shasum":"d549534374751e29f375822777d007a3403cf4d5","size":6534,"noattachment":false,"key":"/deeper/-/deeper-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/deeper/download/deeper-2.0.1.tgz"},"maintainers":[{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"directories":{},"publish_time":1440915882157,"_cnpm_publish_time":1440915882157,"_hasShrinkwrap":false},"2.0.0":{"name":"deeper","version":"2.0.0","description":"JavaScript \"deep equality\" / structural equality tester with Node.js flavor.","main":"deeper.js","scripts":{"test":"standard && tap test/*.js --coverage"},"repository":{"type":"git","url":"git+https://github.com/othiym23/node-deeper.git"},"keywords":["deep","equals","structural","equality","assert","testing"],"author":{"name":"Forrest L Norvell","email":"ogd@aoaioxxysz.net","url":"https://github.com/othiym23"},"license":"BSD-2-Clause","devDependencies":{"standard":"^5.1.1","tap":"^1.3.2"},"gitHead":"cb5a7b0a939f1f7c7b214e8b77e211fe791d60ef","bugs":{"url":"https://github.com/othiym23/node-deeper/issues"},"homepage":"https://github.com/othiym23/node-deeper#readme","_id":"deeper@2.0.0","_shasum":"6d5253d9afe138ec797f3928fe0073fb8c04afe8","_from":".","_npmVersion":"3.3.1","_nodeVersion":"2.5.0","_npmUser":{"name":"othiym23","email":"ogd@aoaioxxysz.net"},"dist":{"shasum":"6d5253d9afe138ec797f3928fe0073fb8c04afe8","size":5663,"noattachment":false,"key":"/deeper/-/deeper-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/deeper/download/deeper-2.0.0.tgz"},"maintainers":[{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"directories":{},"publish_time":1440806544668,"_cnpm_publish_time":1440806544668,"_hasShrinkwrap":false},"1.0.3":{"name":"deeper","version":"1.0.3","description":"Node.js-specific \"deep equality\" / structural equality tester.","main":"deeper.js","directories":{"test":"test"},"scripts":{"test":"tap test/deeper.tap.js"},"repository":{"type":"git","url":"git+https://github.com/othiym23/node-deeper.git"},"keywords":["deep","equals","structural","equality","assert","testing"],"author":{"name":"Forrest L Norvell","email":"ogd@aoaioxxysz.net","url":"https://github.com/othiym23"},"license":"Apache License 2.0","devDependencies":{"chai":"^2.3.0","inherits":"^1.0.0","tap":"^0.7.1"},"optionalDependencies":{"buffertools":"^2.1.2"},"gitHead":"37d478d5c3346905ad69de2bea0e66d97689ba3f","bugs":{"url":"https://github.com/othiym23/node-deeper/issues"},"homepage":"https://github.com/othiym23/node-deeper#readme","dependencies":{"buffertools":"^2.1.2"},"_id":"deeper@1.0.3","_shasum":"699a30fc3d8e2ae23b1644f47923d6f07f3985aa","_from":".","_npmVersion":"2.9.0","_nodeVersion":"1.8.1","_npmUser":{"name":"othiym23","email":"ogd@aoaioxxysz.net"},"dist":{"shasum":"699a30fc3d8e2ae23b1644f47923d6f07f3985aa","size":7396,"noattachment":false,"key":"/deeper/-/deeper-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/deeper/download/deeper-1.0.3.tgz"},"maintainers":[{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"publish_time":1430441444463,"_cnpm_publish_time":1430441444463,"_hasShrinkwrap":false},"1.0.2":{"name":"deeper","version":"1.0.2","description":"Node.js-specific \"deep equality\" / structural equality tester.","main":"deeper.js","directories":{"test":"test"},"scripts":{"test":"tap test/deeper.tap.js"},"repository":{"type":"git","url":"https://github.com/othiym23/node-deeper.git"},"keywords":["deep","equals","structural","equality","assert","testing"],"author":{"name":"Forrest L Norvell","email":"ogd@aoaioxxysz.net","url":"https://github.com/othiym23"},"license":"Apache License 2.0","devDependencies":{"tap":"~0.3.3","chai":"~1.4.2","inherits":"~1.0.0"},"optionalDependencies":{"buffertools":"~1.1.0"},"readmeFilename":"README.md","_id":"deeper@1.0.2","dependencies":{"buffertools":"~1.1.0"},"dist":{"shasum":"ff691bcc41299f9058a6429ccaab27ba5474e708","size":7426,"noattachment":false,"key":"/deeper/-/deeper-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/deeper/download/deeper-1.0.2.tgz"},"_npmVersion":"1.1.69","_npmUser":{"name":"othiym23","email":"ogd@aoaioxxysz.net"},"maintainers":[{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"publish_time":1357537968111,"_cnpm_publish_time":1357537968111,"_hasShrinkwrap":false},"1.0.1":{"name":"deeper","version":"1.0.1","description":"Node.js-specific \"deep equality\" / structural equality tester.","main":"deeper.js","directories":{"test":"test"},"scripts":{"test":"tap test/deeper.tap.js"},"repository":{"type":"git","url":"https://github.com/othiym23/deeper.git"},"keywords":["deep","equals","structural","equality","assert","testing"],"author":{"name":"Forrest L Norvell","email":"ogd@aoaioxxysz.net","url":"https://github.com/othiym23"},"license":"Apache License 2.0","devDependencies":{"tap":"~0.3.3","chai":"~1.4.2","inherits":"~1.0.0"},"optionalDependencies":{"buffertools":"~1.1.0"},"readmeFilename":"README.md","_id":"deeper@1.0.1","dependencies":{"buffertools":"~1.1.0"},"dist":{"shasum":"75441e6e3a56f5462feb1cf451d3cbd333efe252","size":7424,"noattachment":false,"key":"/deeper/-/deeper-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/deeper/download/deeper-1.0.1.tgz"},"_npmVersion":"1.1.69","_npmUser":{"name":"othiym23","email":"ogd@aoaioxxysz.net"},"maintainers":[{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"publish_time":1357536957635,"_cnpm_publish_time":1357536957635,"_hasShrinkwrap":false},"1.0.0":{"name":"deeper","version":"1.0.0","description":"Node.js-specific \"deep equality\" / structural equality tester.","main":"deeper.js","directories":{"test":"test"},"scripts":{"test":"tap test/deeper.tap.js"},"repository":{"type":"git","url":"https://github.com/othiym23/deeper.git"},"keywords":["deep","equals","structural","equality","assert","testing"],"author":{"name":"Forrest L Norvell","email":"ogd@aoaioxxysz.net","url":"https://github.com/othiym23"},"license":"Apache License 2.0","devDependencies":{"tap":"~0.3.3","chai":"~1.4.2","inherits":"~1.0.0"},"optionalDependencies":{"buffertools":"~1.1.0"},"_id":"deeper@1.0.0","dependencies":{"buffertools":"~1.1.0"},"dist":{"shasum":"3572f30030587025734cc1faa933a732f5c34a57","size":5638,"noattachment":false,"key":"/deeper/-/deeper-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/deeper/download/deeper-1.0.0.tgz"},"_npmVersion":"1.1.69","_npmUser":{"name":"othiym23","email":"ogd@aoaioxxysz.net"},"maintainers":[{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"publish_time":1357460093930,"_cnpm_publish_time":1357460093930,"_hasShrinkwrap":false}},"readme":"[![deeper on npm](https://img.shields.io/npm/v/deeper.svg?style=flat)](http://npm.im/deeper)\n[![Build Status](https://travis-ci.org/othiym23/node-deeper.svg?branch=master)](https://travis-ci.org/othiym23/node-deeper)\n[![Coverage Status](https://coveralls.io/repos/othiym23/node-deeper/badge.svg?branch=master&service=github)](https://coveralls.io/github/othiym23/node-deeper?branch=master)\n[![\"standard\" style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)\n\n\n# deeper\n\n`deeper` is a library for structurally comparing the equality of JavaScript\nvalues. It supports recursive / cyclical data structures, is written to avoid\ntry / catch / throw (for speed), and has no dependencies by default.\n\nIf you're running Node 0.12+ or io.js, `deeper` will use the built-in\n`Buffer.equals()`.  If you're running an older version of Node and you install\n[Ben Noordhuis](http://github.com/bnoordhuis)'s\n[buffertools](https://github.com/bnoordhuis/node-buffertools) into a project\nusing `deeper`, it will use that to speed up comparison of Buffers. This used\nto be installed as an optional dependency, but it gets in the way of\nbrowserification and also makes using `deeper` in your own projects harder, so\nI changed it to just try to use it if it's there.\n\nIt has some optimizations, but stresses correctness over raw speed (unless\nyou're testing objects with lots of Buffers attached to them, in which case it\nplus `buffertools` is likely to be the fastest general-purpose deep-comparison\ntool available).\n\nThe core algorithm is based on those used by Node's assertion library and the\nimplementation of cycle detection in\n[isEqual](http://underscorejs.org/#isEqual) in\n[Underscore.js](http://underscorejs.org/).\n\nI like to think the documentation is pretty OK.\n\n## installation\n\n```\nnpm install deeper\n```\n\n## usage\n\n```javascript\n// vanilla\nvar deepEqual = require('deeper')\n\nif (!deepEqual(obj1, obj2)) console.log(\"yay! diversity!\");\n```\n\n## details\n\nCopied from the source, here are the details of `deeper`'s algorithm:\n\n1. `===` only tests objects and functions by reference. `null` is an object.\n   Any pairs of identical entities failing this test are therefore objects\n   (including `null`), which need to be recursed into and compared attribute by\n   attribute.\n2. Since the only entities to get to this test must be objects, if `a` or `b`\n   is not an object, they're clearly not the same. All unfiltered `a` and `b`\n   getting past this are objects (including `null`).\n3. `null` is an object, but `null === null.` All unfiltered `a` and `b` are\n   non-null `Objects`.\n4. Buffers need to be special-cased because they live partially on the wrong\n   side of the C++ / JavaScript barrier. Still, calling this on structures\n   that can contain Buffers is a bad idea, because they can contain\n   multiple megabytes of data and comparing them byte-by-byte is hella\n   expensive.\n5. It's much faster to compare dates by numeric value (`.getTime()`) than by\n   lexical value.\n6. Compare `RegExps` by their components, not the objects themselves.\n7. Treat argumens objects like arrays. The parts of an arguments list most\n   people care about are the arguments themselves, not `callee`, which you\n   shouldn't be looking at anyway.\n8. Objects are more complex:\n    1. Ensure that `a` and `b` are on the same constructor chain.\n    2. Ensure that `a` and `b` have the same number of own properties (which is\n       what `Object.keys()` returns).\n    3. Ensure that cyclical references don't blow up the stack.\n    4. Ensure that all the key names match (faster).\n    5. Ensure that all of the associated values match, recursively (slower).\n\n### (somewhat untested) assumptions:\n\n- Functions are only considered identical if they unify to the same reference.\n  To anything else is to invite the wrath of the halting problem.\n- V8 is smart enough to optimize treating an Array like any other kind of\n  object.\n- Users of this function are cool with mutually recursive data structures that\n  are otherwise identical being treated as the same.\n\n## license\nBSD. Go nuts.\n","_attachments":{},"homepage":"https://github.com/othiym23/node-deeper#readme","bugs":{"url":"https://github.com/othiym23/node-deeper/issues"},"license":"BSD-2-Clause"}