{"_id":"shallow-equal","_rev":"2930568","name":"shallow-equal","description":"Typescript-compatible minimalistic shallow equality check for arrays/objects","dist-tags":{"latest":"3.1.0"},"maintainers":[{"name":"fivecar","email":""},{"name":"moroshko","email":"michael.moroshko@gmail.com"}],"time":{"modified":"2023-03-09T07:37:13.000Z","created":"2016-08-12T11:24:28.361Z","3.1.0":"2023-02-15T21:21:50.830Z","3.0.0":"2023-01-26T02:48:30.024Z","1.2.1":"2019-12-06T10:03:00.611Z","1.2.0":"2019-06-12T12:01:06.017Z","1.1.0":"2019-02-05T08:04:10.550Z","1.0.0":"2016-08-12T11:24:28.361Z"},"users":{"chaofeis":true,"dwqs":true},"author":{"name":"Philip Su","email":"philip@sparkanvil.com"},"repository":{"type":"git","url":"git+https://github.com/moroshko/shallow-equal.git"},"versions":{"3.1.0":{"name":"shallow-equal","version":"3.1.0","description":"Typescript-compatible minimalistic shallow equality check for arrays/objects","main":"dist/index.js","module":"dist/index.modern.mjs","source":"src/index.ts","types":"dist/index.d.ts","keywords":["shallow","equality","compare","comparison","shallowequal","shallow-equal","shallowequals","shallow-equals","isshallowequal","is-shallow-equal","equal","equals","isequal","is-equal","object","array","check","test","typescript"],"repository":{"type":"git","url":"git+https://github.com/moroshko/shallow-equal.git"},"license":"MIT","author":{"name":"Philip Su","email":"philip@sparkanvil.com"},"scripts":{"prebuild":"npm run lint && npm test","build":"microbundle --no-compress --format modern,cjs","lint":"eslint src --ext .ts","prepare":"npm run build","test":"jest --coverage","release":"release-it"},"jest":{"transform":{".(ts|tsx)":"ts-jest"},"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$","moduleFileExtensions":["ts","tsx","js"],"collectCoverage":true,"coverageThreshold":{"global":{"branches":100,"functions":100,"lines":100,"statements":100}}},"devDependencies":{"@types/jest":"^24.0.23","@typescript-eslint/eslint-plugin":"^2.11.0","@typescript-eslint/parser":"^2.11.0","eslint":"^6.8.0","eslint-plugin-jest":"^23.1.1","eslint-plugin-json":"^2.0.1","jest":"^29.4.0","microbundle":"^0.15.1","release-it":"^15.6.0","ts-jest":"^29.0.5","typescript":"^4.4.4"},"gitHead":"782329b14436c306490c94cb46544b626d23673a","bugs":{"url":"https://github.com/moroshko/shallow-equal/issues"},"homepage":"https://github.com/moroshko/shallow-equal#readme","_id":"shallow-equal@3.1.0","_nodeVersion":"16.16.0","_npmVersion":"9.5.0","dist":{"shasum":"e7a54bac629c7f248eff6c2f5b63122ba4320bec","size":3688,"noattachment":false,"key":"/shallow-equal/-/shallow-equal-3.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/shallow-equal/download/shallow-equal-3.1.0.tgz"},"_npmUser":{"name":"fivecar","email":"philip@sparkanvil.com"},"directories":{},"maintainers":[{"name":"fivecar","email":""},{"name":"moroshko","email":"michael.moroshko@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/shallow-equal_3.1.0_1676496110549_0.927564421254478"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-02-15T21:21:50.830Z","publish_time":1676496110830,"_cnpm_publish_time":1676496110830},"3.0.0":{"name":"shallow-equal","version":"3.0.0","description":"Typescript-compatible minimalistic shallow equality check for arrays/objects","main":"dist/index.js","module":"dist/index.modern.js","source":"src/index.ts","types":"dist/index.d.ts","keywords":["shallow","equality","compare","comparison","shallowequal","shallow-equal","shallowequals","shallow-equals","isshallowequal","is-shallow-equal","equal","equals","isequal","is-equal","object","array","check","test","typescript"],"repository":{"type":"git","url":"git+https://github.com/moroshko/shallow-equal.git"},"license":"MIT","author":{"name":"Philip Su","email":"philip@sparkanvil.com"},"scripts":{"prebuild":"npm run lint && npm test","build":"microbundle --no-compress --format modern,cjs","lint":"eslint src --ext .ts","prepare":"npm run build","test":"jest --coverage","release":"release-it"},"jest":{"transform":{".(ts|tsx)":"ts-jest"},"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$","moduleFileExtensions":["ts","tsx","js"],"collectCoverage":true,"coverageThreshold":{"global":{"branches":100,"functions":100,"lines":100,"statements":100}}},"devDependencies":{"@types/jest":"^24.0.23","@typescript-eslint/eslint-plugin":"^2.11.0","@typescript-eslint/parser":"^2.11.0","eslint":"^6.8.0","eslint-plugin-jest":"^23.1.1","eslint-plugin-json":"^2.0.1","jest":"^29.4.0","microbundle":"^0.15.1","release-it":"^15.6.0","ts-jest":"^29.0.5","typescript":"^4.4.4"},"gitHead":"43fa8029e0e4ccbe3509d1b7f962d2292fe7048b","bugs":{"url":"https://github.com/moroshko/shallow-equal/issues"},"homepage":"https://github.com/moroshko/shallow-equal#readme","_id":"shallow-equal@3.0.0","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"shasum":"83c9a6ccdc00b6268b1c404be7993434801f7bf6","size":3688,"noattachment":false,"key":"/shallow-equal/-/shallow-equal-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/shallow-equal/download/shallow-equal-3.0.0.tgz"},"_npmUser":{"name":"fivecar","email":"philip@sparkanvil.com"},"directories":{},"maintainers":[{"name":"fivecar","email":""},{"name":"moroshko","email":"michael.moroshko@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/shallow-equal_3.0.0_1674701309834_0.654035265856638"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-01-26T02:48:30.024Z","publish_time":1674701310024,"_cnpm_publish_time":1674701310024},"1.2.1":{"name":"shallow-equal","version":"1.2.1","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":"^6.7.2","eslint-plugin-mocha":"^6.2.2","esm":"^3.2.25","mocha":"^6.2.2","nyc":"^14.1.1","rollup":"^1.27.8"},"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":"0a70685ec379d9064df1e12c4c0855809ccaeff8","bugs":{"url":"https://github.com/moroshko/shallow-equal/issues"},"homepage":"https://github.com/moroshko/shallow-equal#readme","_id":"shallow-equal@1.2.1","_nodeVersion":"10.16.3","_npmVersion":"6.13.2","dist":{"shasum":"4c16abfa56043aa20d050324efa68940b0da79da","size":2462,"noattachment":false,"key":"/shallow-equal/-/shallow-equal-1.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/shallow-equal/download/shallow-equal-1.2.1.tgz"},"maintainers":[{"name":"fivecar","email":""},{"name":"moroshko","email":"michael.moroshko@gmail.com"}],"_npmUser":{"name":"moroshko","email":"michael.moroshko@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/shallow-equal_1.2.1_1575626580463_0.8606980302556329"},"_hasShrinkwrap":false,"publish_time":1575626580611,"_cnpm_publish_time":1575626580611},"1.2.0":{"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":{"shasum":"fd828d2029ff4e19569db7e19e535e94e2d1f5cc","size":2435,"noattachment":false,"key":"/shallow-equal/-/shallow-equal-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/shallow-equal/download/shallow-equal-1.2.0.tgz"},"maintainers":[{"name":"fivecar","email":""},{"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,"publish_time":1560340866017,"_cnpm_publish_time":1560340866017},"1.1.0":{"name":"shallow-equal","version":"1.1.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"},"scripts":{"lint":"eslint src","test":"nyc mocha 'src/*.test.js'","dist":"rm -rf arrays objects && mkdir arrays objects && cp src/arrays.js arrays/index.js && cp src/objects.js objects/index.js","prebuild":"npm run lint && npm test","build":"npm run dist","preversion":"npm run prebuild","postversion":"git push && git push --tags","prepublish":"npm run dist"},"devDependencies":{"chai":"^3.5.0","eslint":"^3.4.0","eslint-plugin-mocha":"^4.4.0","mocha":"^3.0.2","nyc":"^8.1.0"},"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":"1e64839e79f0504181bad1008b837c05a63eb744","bugs":{"url":"https://github.com/moroshko/shallow-equal/issues"},"homepage":"https://github.com/moroshko/shallow-equal#readme","_id":"shallow-equal@1.1.0","_nodeVersion":"8.11.4","_npmVersion":"6.7.0","dist":{"shasum":"cc022f030dcba0d1c198abf658a3c6c744e171ca","size":2155,"noattachment":false,"key":"/shallow-equal/-/shallow-equal-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/shallow-equal/download/shallow-equal-1.1.0.tgz"},"maintainers":[{"name":"fivecar","email":""},{"name":"moroshko","email":"michael.moroshko@gmail.com"}],"_npmUser":{"name":"moroshko","email":"michael.moroshko@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/shallow-equal_1.1.0_1549353850419_0.16688818677718786"},"_hasShrinkwrap":false,"publish_time":1549353850550,"_cnpm_publish_time":1549353850550},"1.0.0":{"name":"shallow-equal","version":"1.0.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"},"scripts":{"lint":"eslint src","test":"mocha src/*.test.js","dist":"rm -rf arrays objects && mkdir arrays objects && cp src/arrays.js arrays/index.js && cp src/objects.js objects/index.js","prebuild":"npm run lint && npm test","build":"npm run dist","preversion":"npm run prebuild","postversion":"git push && git push --tags","prepublish":"npm run dist"},"devDependencies":{"chai":"^3.5.0","eslint":"^3.2.2","eslint-plugin-mocha":"^4.3.0","mocha":"^3.0.2"},"files":["arrays","objects"],"keywords":["shallow","equality","compare","comparison","shallowequal","shallow-equal","shallowequals","shallow-equals","isshallowequal","is-shallow-equal","equal","equals","isequal","is-equal","object","array","check","test"],"license":"MIT","gitHead":"9f412174bb1314119cf6d1a520691b6effaa2990","bugs":{"url":"https://github.com/moroshko/shallow-equal/issues"},"homepage":"https://github.com/moroshko/shallow-equal#readme","_id":"shallow-equal@1.0.0","_shasum":"508d1838b3de590ab8757b011b25e430900945f7","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.3.0","_npmUser":{"name":"moroshko","email":"michael.moroshko@gmail.com"},"dist":{"shasum":"508d1838b3de590ab8757b011b25e430900945f7","size":2950,"noattachment":false,"key":"/shallow-equal/-/shallow-equal-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/shallow-equal/download/shallow-equal-1.0.0.tgz"},"maintainers":[{"name":"fivecar","email":""},{"name":"moroshko","email":"michael.moroshko@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/shallow-equal-1.0.0.tgz_1471001068112_0.13448823615908623"},"directories":{},"publish_time":1471001068361,"_cnpm_publish_time":1471001068361,"_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","_attachments":{},"homepage":"https://github.com/moroshko/shallow-equal#readme","bugs":{"url":"https://github.com/moroshko/shallow-equal/issues"},"license":"MIT"}