{"name":"shallow-equal","version":"1.2.0","description":"Minimalistic shallow equality check for arrays/objects","repository":{"type":"git","url":"git+https://github.com/moroshko/shallow-equal.git"},"author":{"name":"Misha Moroshko","email":"michael.moroshko@gmail.com"},"main":"dist/index.cjs.js","module":"dist/index.esm.js","scripts":{"lint":"eslint src","test":"nyc --require esm mocha 'src/*.test.js'","build:objects":"rm -rf objects && rollup -f cjs -i src/objects.js -o objects/index.js","build:arrays":"rm -rf arrays && rollup -f cjs -i src/arrays.js -o arrays/index.js","build:cjs":"rollup -f cjs -i src/index.js -o dist/index.cjs.js","build:esm":"rollup -f esm -i src/index.js -o dist/index.esm.js","prebuild":"npm run lint && npm test","build":"npm run build:objects && npm run build:arrays && rm -rf dist && npm run build:cjs && npm run build:esm","preversion":"npm run prebuild","postversion":"git push && git push --tags","prepare":"npm run build"},"devDependencies":{"chai":"^4.2.0","eslint":"^5.16.0","eslint-plugin-mocha":"^5.3.0","esm":"^3.2.25","mocha":"^6.1.4","nyc":"^14.1.1","rollup":"^1.15.1"},"keywords":["shallow","equality","compare","comparison","shallowequal","shallow-equal","shallowequals","shallow-equals","isshallowequal","is-shallow-equal","equal","equals","isequal","is-equal","object","array","check","test"],"nyc":{"lines":100,"statements":100,"functions":100,"branches":100,"include":["src/*.js"],"exclude":["src/*.test.js"],"reporter":["lcov","text-summary"],"check-coverage":true},"license":"MIT","gitHead":"2dca9b50be24dff4fb9bf8066b75c5b28e78ad52","bugs":{"url":"https://github.com/moroshko/shallow-equal/issues"},"homepage":"https://github.com/moroshko/shallow-equal#readme","_id":"shallow-equal@1.2.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","_npmUser":{"name":"moroshko","email":"michael.moroshko@gmail.com"},"dist":{"integrity":"sha512-Z21pVxR4cXsfwpMKMhCEIO1PCi5sp7KEp+CmOpBQ+E8GpHwKOw2sEzk7sgblM3d/j4z4gakoWEoPcjK0VJQogA==","shasum":"fd828d2029ff4e19569db7e19e535e94e2d1f5cc","tarball":"http://registry-npm.ywwl.com/shallow-equal/download/shallow-equal-1.2.0.tgz","fileCount":7,"unpackedSize":6689,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdAOmCCRA9TVsSAnZWagAA1dUP/R5qzYUIG0ShumrwJ1GH\nEoSBUOdLoCGzrdbJjBuL33bSPjnNsG4B4hyLUJ94107jZzSBql1RpxSR4qcE\nUWYn4EOlNP1yBxLyfhZIsnO1vVyIaZn8tM6ceVoNs/lfHJIge1D9fqX5Z7a4\neQ5CsmXVeoMrFrF9hOZS47grT3PL+su8IUmda3to92ENDsP0RrsXjiXDBtxt\nmtOaezMGNgNAe/hSxHyj4ORc+OBBcW5VxN0rm4MG9A9d9YwC/jy9EENjyygP\nuWOAzULLrTMtyI0HFKBp+FnKY5UFdepJV1ml08CC7bt9mCdSPprhqUtTA/zb\nvaRWCQvXRWQu3IixIkuozYBzCaK3qDgIj5tjlffjiEcErqAXnph2VghtfS1h\noTKvaXJ7gak4BBvXbJDEqlHD8pNXMbyj72TbQ2MHqYB0M2/cDvv1zwzVaA99\nEi5j+dLYbsqdkSUwTJrcvNOrM1FqG24TV5ggJD2rkEl1pZRPOPJS27NGWXct\n8a0Ha5bMsa0WTx6p9sb0HmKsY0Oj5ZbnSXu4QDJNkbsXImmP1TopJQfTiZg6\nWYVlF5HJx6gp3JULxA/OfWX17txLvbE6BB6U/ldvh+3PBLkZ6rzmHPUQHuYf\nftULDrifQArdbXrOFncerTS9b/9sSOveRIRONIw6lUYrpHZ/Ky07itU+9iLx\nIR0/\r\n=qiG0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC+6ml6mEyIgMgiw3pUfA71DrEETcCylHTLFl5Qz6tj8gIgRmmIiqnnp3Uh1El0HvLVOH8hqFUXGzWt8wL5dm3OYNM="}],"size":2435,"noattachment":false,"key":"/shallow-equal/-/shallow-equal-1.2.0.tgz"},"maintainers":[{"name":"moroshko","email":"michael.moroshko@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/shallow-equal_1.2.0_1560340865882_0.6924676949069863"},"_hasShrinkwrap":false,"readme":"## Description\n\nIf you know you have two arrays or two objects in hand, and you want to know if they are shallowly equal or not, this library is for you.\n\n## Features\n\n- Super light\n- No dependencies\n- Thoroughly tested\n\n## Installation\n\n```shell\nnpm install shallow-equal --save\n```\nor\n```shell\nyarn add shallow-equal\n```\n\n## Usage\n\n```js\nimport { shallowEqualArrays } from \"shallow-equal\";\n\nshallowEqualArrays([1, 2, 3], [1, 2, 3]); // => true\nshallowEqualArrays([{ a: 5 }], [{ a: 5 }]); // => false\n```\n\n```js\nimport { shallowEqualObjects } from \"shallow-equal\";\n\nshallowEqualObjects({ a: 5, b: \"abc\" }, { a: 5, b: \"abc\" }); // => true\nshallowEqualObjects({ a: 5, b: {} }, { a: 5, b: {} }); // => false\n```\n\nYou can also use the generic form, `shallowEqual`. But note that it does runtime type checking in order to decide whether it's comparing arrays or objects, so the convenience comes with a runtime penalty.\n```js\nimport { shallowEqual } from \"shallow-equal\";\n\nshallowEqual([1, 2, 3], [1, 2, 3]); // => true\nshallowEqual({ a: 5, b: {} }, { a: 5, b: {} }); // => false\n```\n","publish_time":1560340866017,"_cnpm_publish_time":1560340866017,"dist-tags":{"latest":"3.1.0"}}