{"name":"deep-eql","version":"4.1.3","keywords":["chai util","deep equal","object equal","testing"],"author":{"name":"Jake Luer","email":"jake@alogicalparadox.com"},"license":"MIT","_id":"deep-eql@4.1.3","maintainers":[{"name":"chaijs","email":"chaijs@keithcirkel.co.uk"},{"name":"chai","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":"7c7775513092f7df98d8df9996dd085eb668cc6d","tarball":"http://registry-npm.ywwl.com/deep-eql/download/deep-eql-4.1.3.tgz","fileCount":5,"integrity":"sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==","signatures":[{"sig":"MEYCIQCTp3DFmJ7MHdkb1BKaj4wMXBKFqmmd0V0hTK/oP6uxUAIhAPF6I/jB++302UCcbPlyI8MEuzGdTYOFw/UWmagW5au5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24238,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjja7zACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr8cxAAgnJyoZ1esZ/Pj3EQ1nAiew3kxo+PfTIOAFhn0fWUNerCF9Q6\r\nHA6Db0BEJ1zpmj7y/E/utVZFyf/2+MquyOyYO63nERpPperf7Bqt4oM1Ti0T\r\nUDFrYL4Gu3kbMt0zaxXz1KRgrHUpGBhZanQ1IYUy2kkZmAfsD8ex26dizV7d\r\nJ2qwtM3MSE3nWZ5AX89yX1rjE3vQAeoLB70R5VRi1AE4ew4A/asjUHaCaMht\r\nvFl4cRW4g457Qemkf9b9+DNhm24mzZ5R+xSNeEvFrztemgv2CilkTECwdzbq\r\nAlxFFL7TXIknj4ZkBlM9dkNUjbkUppnJJ0JZGTdsNv0FAwwcOL/7zM8Fu8PN\r\noukURFeR6ExKELTfVn6BXGC6bvgsl8pgXMZ3Z3x7xGvsOHaflFEZzDVrNxjh\r\nTIkRuz5wZx1sQhfBHkrm61j2y9pE0IgWP+JH8uEH8/bxZLWbyrBpvlo8JWCO\r\nEgd39rh9LDYZEAi5TF2Ct2Ivuszeyg0nssaGdZRlPdW/eXpm6heao2NA1plg\r\nEMwxN73RnVwJ0xh8TXlO9ESJxycmt4HhXx8cYwDdmzn8hKNhmVLKyJt4iY9Y\r\naqIZDa8VLq5o8TvT4TRj2jPbR0QIEPfXbmKyYuce6LLdLBUkrfMBK0iHFIFd\r\nioZp6ozPq47EzvxeOA6pcKKCodNMEF87IcI=\r\n=P5zf\r\n-----END PGP SIGNATURE-----\r\n","size":7198,"noattachment":false,"key":"/deep-eql/-/deep-eql-4.1.3.tgz"},"main":"./index","engines":{"node":">=6"},"gitHead":"0e417c7b98d927175a9e25e583014d25ca4a5044","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":"chai","email":"chaijs@keithcirkel.co.uk"},"repository":{"url":"git+ssh://git@github.com/chaijs/deep-eql.git","type":"git"},"_npmVersion":"8.19.2","description":"Improved deep equality testing for Node.js and the browser.","directories":{},"_nodeVersion":"18.12.1","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":"^6.3.4","kewlr":"^0.4.1","mocha":"^9.1.1","eslint":"^7.32.0","istanbul":"^0.4.2","benchmark":"^2.1.0","coveralls":"^3.1.1","browserify":"^17.0.0","karma-mocha":"^2.0.1","simple-assert":"^1.0.0","karma-coverage":"^2.0.3","lodash.isequal":"^4.4.0","karma-browserify":"^8.1.0","lcov-result-merger":"^1.0.2","browserify-istanbul":"^3.0.1","eslint-config-strict":"^14.0.1","karma-sauce-launcher":"^4.1.4","@js-temporal/polyfill":"^0.4.1","karma-chrome-launcher":"^3.1.0","eslint-plugin-filenames":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/deep-eql_4.1.3_1670229746968_0.15335099791964812","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":1670229747118,"_cnpm_publish_time":1670229747118,"dist-tags":{"latest":"5.0.2","legacy":"4.1.4"}}