{"name":"deep-eql","version":"3.0.1","keywords":["chai util","deep equal","object equal","testing"],"author":{"name":"Jake Luer","email":"jake@alogicalparadox.com"},"license":"MIT","_id":"deep-eql@3.0.1","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":"dfc9404400ad1c8fe023e7da1df1c147c4b444df","tarball":"http://registry-npm.ywwl.com/deep-eql/download/deep-eql-3.0.1.tgz","integrity":"sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==","signatures":[{"sig":"MEQCIA2Guc+Zr2++fpu1HORRISQsk11kiAUxrDzV8xdJtCwvAiBEz45k8/VAewT+AIlg5CPaJ3gB2t17o0CIetQyvSPPcw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":10566,"noattachment":false,"key":"/deep-eql/-/deep-eql-3.0.1.tgz"},"main":"./index","files":["index.js","deep-eql.js"],"config":{"ghooks":{"commit-msg":"validate-commit-msg"}},"engines":{"node":">=0.12"},"gitHead":"04d6da6518f8ddc288638ca42503752028810120","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":"5.4.0","description":"Improved deep equality testing for Node.js and the browser.","directories":{},"_nodeVersion":"4.8.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"]},"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-3.0.1.tgz_1504732162073_0.5694719541352242","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":1504732163075,"_cnpm_publish_time":1504732163075,"dist-tags":{"latest":"5.0.2","legacy":"4.1.4"}}