{"name":"which-collection","version":"1.0.0","description":"Which kind of Collection (Map, Set, WeakMap, WeakSet) is this JavaScript value? Works cross-realm, without `instanceof`, and despite Symbol.toStringTag.","main":"index.js","scripts":{"prepublish":"safe-publish-latest","lint":"eslint .","pretest":"npm run lint","tests-only":"node test","test":"npm run tests-only","posttest":"npx aud","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git+https://github.com/inspect-js/which-collection.git"},"keywords":["map","set","weakmap","weakset","collection.es6","es2015"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/which-collection/issues"},"homepage":"https://github.com/inspect-js/which-collection#readme","devDependencies":{"@ljharb/eslint-config":"^15.0.1","auto-changelog":"^1.16.2","eslint":"^6.6.0","for-each":"^0.3.3","object-inspect":"^1.7.0","safe-publish-latest":"^1.1.4","tape":"^4.11.0"},"dependencies":{"is-map":"^2.0.0","is-set":"^2.0.0","is-weakmap":"^2.0.0","is-weakset":"^2.0.0"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false},"gitHead":"abf79aef38fcd7d699f0cb00a8f1850960822973","_id":"which-collection@1.0.0","_nodeVersion":"13.1.0","_npmVersion":"6.12.1","dist":{"integrity":"sha512-mG4RtFHE+17N2AxRNvBQ488oBjrhaOaI/G+soUaRJwdyDbu5zmqoAKPYBlY7Zd+QTwpfvInRLKo40feo2si1yA==","shasum":"303d38022473f4b7048b529b45f6c842d8814269","tarball":"http://registry-npm.ywwl.com/which-collection/download/which-collection-1.0.0.tgz","fileCount":9,"unpackedSize":9637,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzGDyCRA9TVsSAnZWagAARAkP/R5pBRm34CKkle2kKybr\nuIT+57kRBpsCroNg7yALwFO2gvWIDh8JuO0ldAljj/C9F8j4hpUBfVnHuqKk\n9jjhHe3uci/2f/LzOJZIPCgaQnEUbYPYR88a/DORXDUsDFNdAKphrccWG/WG\nCRobihnexdhrqh2FNbuJfvsCwQk5+3Vf4hcwXjUzJNUB5SpioEj5zvqTi8IQ\n6Js3wm2re0fq8vWzuUAO6pi5TA6nATDzs2fpOOSc5xYcFq62nc8Lm3ajAsct\noH8kma2hKVIU5joZSl0/Pw/TNNkRas5C7sPPtb6oSG0yUVpm/4ihtkxMBf2C\nmJyaDKrz6OUYyCP8RNsjEeS4nywJcnyV/I5fOJQ2YIS2m/nSnpG6b1qAZNlR\nLuz8mtiklIi6FD7So2lNvA7e/0IKyj/Z9Qgd/JhHZOJmNkq27HDCcI8Bzmcv\n6xaBzRjjJziI+1Wsop7hqx1hy4IN8KOHZhxXXNJjpRfV2aDQiFFfMFY9dVwU\nt72kdEBJJKEi8WXOWz+nDvlBWmR2qfB/p3R0uOjYZxxF4r+h0L1gZ5UJZfor\nS2nSCC8llcNL+WLmngCPTem8Lu9D/pZIKE+S6ryt8HSsqBfsuRAKIA5l9onD\nZfFzwNukwVsoCRCBnMESNuTp52balCQ8B1koNjHMApo9AFOvI80NfnTKLD8V\nLBhd\r\n=EXdB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDQDKEkeoE4L4xLEgdzKetln+iypcmmhgxBXJ0guRbaywIhAOBaf9a9PVfg2gJ1n0kGlMRJtnRWZfjaGF+l+Oq+tyak"}],"size":3839,"noattachment":false,"key":"/which-collection/-/which-collection-1.0.0.tgz"},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/which-collection_1.0.0_1573675249568_0.7044027117797167"},"_hasShrinkwrap":false,"readme":"# which-collection <sup>[![Version Badge][2]][1]</sup>\n\n[![github actions][actions-image]][actions-url]\n[![coverage][codecov-image]][codecov-url]\n[![dependency status][5]][6]\n[![dev dependency status][7]][8]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][11]][1]\n\nWhich kind of Collection (Map, Set, WeakMap, WeakSet) is this JavaScript value? Works cross-realm, without `instanceof`, and despite Symbol.toStringTag.\n\n## Example\n\n```js\nvar whichCollection = require('which-collection');\nvar assert = require('assert');\n\nassert.equal(false, whichCollection(undefined));\nassert.equal(false, whichCollection(null));\nassert.equal(false, whichCollection(false));\nassert.equal(false, whichCollection(true));\nassert.equal(false, whichCollection([]));\nassert.equal(false, whichCollection({}));\nassert.equal(false, whichCollection(/a/g));\nassert.equal(false, whichCollection(new RegExp('a', 'g')));\nassert.equal(false, whichCollection(new Date()));\nassert.equal(false, whichCollection(42));\nassert.equal(false, whichCollection(NaN));\nassert.equal(false, whichCollection(Infinity));\nassert.equal(false, whichCollection(new Number(42)));\nassert.equal(false, whichCollection(42n));\nassert.equal(false, whichCollection(Object(42n)));\nassert.equal(false, whichCollection('foo'));\nassert.equal(false, whichCollection(Object('foo')));\nassert.equal(false, whichCollection(function () {}));\nassert.equal(false, whichCollection(function* () {}));\nassert.equal(false, whichCollection(x => x * x));\nassert.equal(false, whichCollection([]));\n\nassert.equal('Map', whichCollection(new Map()));\nassert.equal('Set', whichCollection(new Set()));\nassert.equal('WeakMap', whichCollection(new WeakMap()));\nassert.equal('WeakSet', whichCollection(new WeakSet()));\n```\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[1]: https://npmjs.org/package/which-collection\n[2]: https://versionbadg.es/inspect-js/which-collection.svg\n[5]: https://david-dm.org/inspect-js/which-collection.svg\n[6]: https://david-dm.org/inspect-js/which-collection\n[7]: https://david-dm.org/inspect-js/which-collection/dev-status.svg\n[8]: https://david-dm.org/inspect-js/which-collection#info=devDependencies\n[11]: https://nodei.co/npm/which-collection.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/which-collection.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/which-collection.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=which-collection\n[codecov-image]: https://codecov.io/gh/inspect-js/which-collection/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/inspect-js/which-collection/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/which-collection\n[actions-url]: https://github.com/inspect-js/which-collection/actions\n","publish_time":1573675249653,"_cnpm_publish_time":1573675249653,"dist-tags":{"latest":"1.0.2"}}