{"name":"deep-eql","version":"4.0.0","keywords":["chai util","deep equal","object equal","testing"],"author":{"name":"Jake Luer","email":"jake@alogicalparadox.com"},"license":"MIT","_id":"deep-eql@4.0.0","maintainers":[{"name":"chaijs","email":"chaijs@keithcirkel.co.uk"}],"contributors":[{"url":"https://github.com/keithamus","name":"Keith Cirkel"},{"url":"https://github.com/dougluce","name":"dougluce"},{"url":"https://github.com/flowlo","name":"Lorenz Leutgeb"}],"homepage":"https://github.com/chaijs/deep-eql#readme","bugs":{"url":"https://github.com/chaijs/deep-eql/issues"},"dist":{"shasum":"c70af2713a4e18d9c2c1203ff9d11abbd51c8fbd","tarball":"http://registry-npm.ywwl.com/deep-eql/download/deep-eql-4.0.0.tgz","fileCount":5,"integrity":"sha512-GxJC5MOg2KyQlv6WiUF/VAnMj4MWnYiXo4oLgeptOELVoknyErb4Z8+5F/IM/K4g9/80YzzatxmWcyRwUseH0A==","signatures":[{"sig":"MEUCIQC0rG7BYmeR2ochg3B0wFlnwHV9od7gYvvEV1P6/7m0GQIgNGlJJET2xLF768WCX77jsNXQ2+Hq+Q8NB0zn6lnbMSw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55302,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbxQkGCRA9TVsSAnZWagAAEpoQAIXPdNzHTKWUPqr7g0oE\nHyZoiN5Q2Kmt33h65Oi468x3xw0oY7KUb5GDVNyxpZ5M9EuAw37hpn65YSuB\n5+zT3ZfonbSxFqiZNrU1U4dvl7Xh2WiW5AxWMu9AQFYzKRAAwb8vYnbtcVJe\n8Ab1OdnYd4BFsMWoDldw3A7baQ4GbldJgHKzkBkSYmbJhIBdYtRG2vQpMaPQ\novrZdzuTWNGf5s3XG4n6b0CWe3+rNN7c0Bctaz+X86oXrCk7l80B45h5u5ij\n83Fo2ROuiXWHWiIS9yGx0DW0fewGuQ17kNLqifkzpIg6upLr76SWfPxjavAK\n4MWAp7cu/lSb2rzsFfXH1RUlIZo2SVpHUCy3OSQT08I0YrF583GeiYWmZnc0\nrUQzmr4lC1srQHd3YEjMH28mYC4fge405doRHNRwz3axJEAFj5WlwTiUuaRe\nSpivkdAVeOioZ/fnEMf0EqerctUv0GDP5rYPjQ8D6dBR6FklWFaLSOyxNpUH\nkvXv+Rw9QgUl660YDrP3qYeOW2tzEY7de8UPspSnkTSfUOrbB08xmNKS28Sp\nqmCnH7GT662Bi6NnZ720FlOxFX5EzdHeRe0uSWdqjhw5V9GHTgHZTdmtVm5K\nwcYAq8JwjnX5KlYqiEegVf7JckZutGdS5k06KEA8aav16HyRqA1/AiIZLLbQ\nXGuK\r\n=b7g6\r\n-----END PGP SIGNATURE-----\r\n","size":10884,"noattachment":false,"key":"/deep-eql/-/deep-eql-4.0.0.tgz"},"main":"./index","config":{"ghooks":{"commit-msg":"validate-commit-msg"}},"engines":{"node":">=6"},"gitHead":"fa5c6042e5c127df12e1f3ee4b9f9b3e2302864c","scripts":{"lint":"eslint --ignore-path .gitignore .","test":"npm run test:node && npm run test:browser","bench":"node bench","build":"browserify $npm_package_main --standalone deepEqual -o deep-eql.js","watch":"karma start --auto-watch --singleRun=false","pretest":"npm run lint","test:node":"istanbul cover _mocha","prepublish":"npm run build","test:browser":"karma start --singleRun=true","upload-coverage":"lcov-result-merger 'coverage/**/lcov.info' | coveralls; exit 0","semantic-release":"semantic-release pre && npm publish && semantic-release post"},"_npmUser":{"name":"chaijs","email":"chaijs@keithcirkel.co.uk"},"repository":{"url":"git+ssh://git@github.com/chaijs/deep-eql.git","type":"git"},"_npmVersion":"6.4.1","description":"Improved deep equality testing for Node.js and the browser.","directories":{},"_nodeVersion":"6.14.4","dependencies":{"type-detect":"^4.0.0"},"eslintConfig":{"rules":{"complexity":0,"spaced-comment":0,"no-underscore-dangle":0,"no-use-before-define":0},"extends":["strict/es5"]},"_hasShrinkwrap":false,"devDependencies":{"karma":"^0.13.22","kewlr":"^0.3.1","mocha":"^3.1.2","eslint":"^2.4.0","ghooks":"^1.0.1","istanbul":"^0.4.2","watchify":"^3.7.0","benchmark":"^2.1.0","component":"*","coveralls":"2.11.8","browserify":"^13.0.0","karma-mocha":"^0.2.2","simple-assert":"^1.0.0","karma-coverage":"^0.5.5","lodash.isequal":"^4.4.0","karma-browserify":"^5.0.2","semantic-release":"^4.3.5","travis-after-all":"^1.4.4","lcov-result-merger":"^1.0.2","phantomjs-prebuilt":"^2.1.5","browserify-istanbul":"^1.0.0","validate-commit-msg":"^2.3.1","eslint-config-strict":"^8.5.0","karma-sauce-launcher":"^0.3.1","eslint-plugin-filenames":"^0.2.0","karma-phantomjs-launcher":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/deep-eql_4.0.0_1539639557672_0.9535407783556269","host":"s3://npm-registry-packages"},"readme":"<h1 align=center>\n  <a href=\"http://chaijs.com\" title=\"Chai Documentation\">\n    <img alt=\"deep-eql\" src=\"https://raw.githubusercontent.com/chaijs/deep-eql/main/deep-eql-logo.svg\"/>\n  </a>\n</h1>\n\n<p align=center>\n  Improved deep equality testing for <a href=\"http://nodejs.org/\">node</a> and the browser.\n</p>\n\n<p align=center>\n  <a href=\"https://github.com/chaijs/deep-eql/actions\">\n    <img\n      alt=\"build:?\"\n      src=\"https://github.com/chaijs/deep-eql/workflows/Build/badge.svg\"\n    />\n  </a><a href=\"https://coveralls.io/r/chaijs/deep-eql\">\n    <img\n      alt=\"coverage:?\"\n      src=\"https://img.shields.io/coveralls/chaijs/deep-eql/master.svg?style=flat-square\"\n    />\n  </a><a href=\"https://www.npmjs.com/packages/deep-eql\">\n    <img\n      alt=\"dependencies:?\"\n      src=\"https://img.shields.io/npm/dm/deep-eql.svg?style=flat-square\"\n    />\n  </a><a href=\"\">\n    <img\n      alt=\"devDependencies:?\"\n      src=\"https://img.shields.io/david/chaijs/deep-eql.svg?style=flat-square\"\n    />\n  </a>\n  <br>\n  <a href=\"https://chai-slack.herokuapp.com/\">\n    <img\n      alt=\"Join the Slack chat\"\n      src=\"https://img.shields.io/badge/slack-join%20chat-E2206F.svg?style=flat-square\"\n    />\n  </a>\n  <a href=\"https://gitter.im/chaijs/deep-eql\">\n    <img\n      alt=\"Join the Gitter chat\"\n      src=\"https://img.shields.io/badge/gitter-join%20chat-D0104D.svg?style=flat-square\"\n    />\n  </a>\n</p>\n\n## What is Deep-Eql?\n\nDeep Eql is a module which you can use to determine if two objects are \"deeply\" equal - that is, rather than having referential equality (`a === b`), this module checks an object's keys recursively, until it finds primitives to check for referential equality. For more on equality in JavaScript, read [the comparison operators article on mdn](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators).\n\nAs an example, take the following:\n\n```js\n1 === 1 // These are primitives, they hold the same reference - they are strictly equal\n1 == '1' // These are two different primitives, through type coercion they hold the same value - they are loosely equal\n{ a: 1 } !== { a: 1 } // These are two different objects, they hold different references and so are not strictly equal - even though they hold the same values inside\n{ a: 1 } != { a: 1 } // They have the same type, meaning loose equality performs the same check as strict equality - they are still not equal.\n\nvar deepEql = require(\"deep-eql\");\ndeepEql({ a: 1 }, { a: 1 }) === true // deepEql can determine that they share the same keys and those keys share the same values, therefore they are deeply equal!\n```\n\n## Installation\n\n### Node.js\n\n`deep-eql` is available on [npm](http://npmjs.org).\n\n    $ npm install deep-eql\n\n## Usage\n\nThe primary export of `deep-eql` is function that can be given two objects to compare. It will always return a boolean which can be used to determine if two objects are deeply equal.\n\n### Rules\n\n- Strict equality for non-traversable nodes according to [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is):\n  - `eql(NaN, NaN).should.be.true;`\n  - `eql(-0, +0).should.be.false;`\n- All own and inherited enumerable properties are considered:\n  - `eql(Object.create({ foo: { a: 1 } }), Object.create({ foo: { a: 1 } })).should.be.true;`\n  - `eql(Object.create({ foo: { a: 1 } }), Object.create({ foo: { a: 2 } })).should.be.false;`\n- When comparing `Error` objects, only `name`, `message`, and `code` properties are considered, regardless of enumerability:\n  - `eql(Error('foo'), Error('foo')).should.be.true;`\n  - `eql(Error('foo'), Error('bar')).should.be.false;`\n  - `eql(Error('foo'), TypeError('foo')).should.be.false;`\n  - `eql(Object.assign(Error('foo'), { code: 42 }), Object.assign(Error('foo'), { code: 42 })).should.be.true;`\n  - `eql(Object.assign(Error('foo'), { code: 42 }), Object.assign(Error('foo'), { code: 13 })).should.be.false;`\n  - `eql(Object.assign(Error('foo'), { otherProp: 42 }), Object.assign(Error('foo'), { otherProp: 13 })).should.be.true;`\n- Arguments are not Arrays:\n  - `eql([], arguments).should.be.false;`\n  - `eql([], Array.prototype.slice.call(arguments)).should.be.true;`\n","publish_time":1539639557819,"_cnpm_publish_time":1539639557819,"dist-tags":{"latest":"5.0.2","legacy":"4.1.4"}}