pax_global_header 0000666 0000000 0000000 00000000064 13765612213 0014520 g ustar 00root root 0000000 0000000 52 comment=d76d9443208f4cee581d551c549d4f41bc214b95
is-map-2.0.2/ 0000775 0000000 0000000 00000000000 13765612213 0012707 5 ustar 00root root 0000000 0000000 is-map-2.0.2/.eslintignore 0000664 0000000 0000000 00000000012 13765612213 0015403 0 ustar 00root root 0000000 0000000 coverage/
is-map-2.0.2/.eslintrc 0000664 0000000 0000000 00000000242 13765612213 0014531 0 ustar 00root root 0000000 0000000 {
"root": true,
"extends": "@ljharb",
"overrides": [
{
"files": "test/**",
"globals": {
"WeakMap": false,
"WeakSet": false,
},
},
],
}
is-map-2.0.2/.gitattributes 0000664 0000000 0000000 00000000014 13765612213 0015575 0 ustar 00root root 0000000 0000000 * text=auto
is-map-2.0.2/.github/ 0000775 0000000 0000000 00000000000 13765612213 0014247 5 ustar 00root root 0000000 0000000 is-map-2.0.2/.github/FUNDING.yml 0000664 0000000 0000000 00000001101 13765612213 0016055 0 ustar 00root root 0000000 0000000 # These are supported funding model platforms
github: [ljharb]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: npm/is-map
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
is-map-2.0.2/.github/workflows/ 0000775 0000000 0000000 00000000000 13765612213 0016304 5 ustar 00root root 0000000 0000000 is-map-2.0.2/.github/workflows/node-4+.yml 0000664 0000000 0000000 00000003073 13765612213 0020173 0 ustar 00root root 0000000 0000000 name: 'Tests: node.js'
on: [pull_request, push]
jobs:
matrix:
runs-on: ubuntu-latest
outputs:
latest: ${{ steps.set-matrix.outputs.requireds }}
minors: ${{ steps.set-matrix.outputs.optionals }}
steps:
- uses: ljharb/actions/node/matrix@main
id: set-matrix
with:
versionsAsRoot: true
preset: '>=4'
latest:
needs: [matrix]
name: 'latest minors'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.latest) }}
command:
- 'tests-only'
- 'tests:shims'
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'npm install && npm run ${{ matrix.command }}'
with:
node-version: ${{ matrix.node-version }}
command: ${{ matrix.command }}
minors:
needs: [matrix, latest]
name: 'non-latest minors'
continue-on-error: true
if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.minors) }}
command:
- 'tests-only'
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'npm install && npm run ${{ matrix.command }}'
with:
node-version: ${{ matrix.node-version }}
command: ${{ matrix.command }}
node:
name: 'node 4+'
needs: [latest, minors]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'
is-map-2.0.2/.github/workflows/node-iojs.yml 0000664 0000000 0000000 00000003317 13765612213 0020722 0 ustar 00root root 0000000 0000000 name: 'Tests: node.js (io.js)'
on: [pull_request, push]
jobs:
matrix:
runs-on: ubuntu-latest
outputs:
latest: ${{ steps.set-matrix.outputs.requireds }}
minors: ${{ steps.set-matrix.outputs.optionals }}
steps:
- uses: ljharb/actions/node/matrix@main
id: set-matrix
with:
versionsAsRoot: true
preset: 'iojs'
latest:
needs: [matrix]
name: 'latest minors'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.latest) }}
command:
- 'tests-only'
- 'tests:shims'
- 'tests:corejs'
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'npm install && npm run ${{ matrix.command }}'
with:
node-version: ${{ matrix.node-version }}
command: ${{ matrix.command }}
skip-ls-check: true
minors:
needs: [matrix, latest]
name: 'non-latest minors'
continue-on-error: true
if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.minors) }}
command:
- 'tests-only'
- 'tests:shims'
- 'tests:corejs'
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'npm install && npm run ${{ matrix.command }}'
with:
node-version: ${{ matrix.node-version }}
command: ${{ matrix.command }}
skip-ls-check: true
node:
name: 'io.js'
needs: [latest, minors]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'
is-map-2.0.2/.github/workflows/node-pretest.yml 0000664 0000000 0000000 00000001067 13765612213 0021444 0 ustar 00root root 0000000 0000000 name: 'Tests: pretest/posttest'
on: [pull_request, push]
jobs:
pretest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'npm install && npm run pretest'
with:
node-version: 'lts/*'
command: 'pretest'
posttest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'npm install && npm run posttest'
with:
node-version: 'lts/*'
command: 'posttest'
is-map-2.0.2/.github/workflows/node-zero.yml 0000664 0000000 0000000 00000003665 13765612213 0020743 0 ustar 00root root 0000000 0000000 name: 'Tests: node.js (0.x)'
on: [pull_request, push]
jobs:
matrix:
runs-on: ubuntu-latest
outputs:
stable: ${{ steps.set-matrix.outputs.requireds }}
unstable: ${{ steps.set-matrix.outputs.optionals }}
steps:
- uses: ljharb/actions/node/matrix@main
id: set-matrix
with:
versionsAsRoot: true
preset: '0.x'
stable:
needs: [matrix]
name: 'stable minors'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.stable) }}
command:
- 'tests-only'
- 'tests:shims'
- 'tests:corejs'
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'npm install && npm run ${{ matrix.command }}'
with:
node-version: ${{ matrix.node-version }}
command: ${{ matrix.command }}
cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }}
skip-ls-check: true
unstable:
needs: [matrix, stable]
name: 'unstable minors'
continue-on-error: true
if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.unstable) }}
command:
- 'tests-only'
- 'tests:shims'
- 'tests:corejs'
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'npm install && npm run ${{ matrix.command }}'
with:
node-version: ${{ matrix.node-version }}
command: ${{ matrix.command }}
cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }}
skip-ls-check: true
node:
name: 'node 0.x'
needs: [stable, unstable]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'
is-map-2.0.2/.github/workflows/rebase.yml 0000664 0000000 0000000 00000000401 13765612213 0020263 0 ustar 00root root 0000000 0000000 name: Automatic Rebase
on: [pull_request_target]
jobs:
_:
name: "Automatic Rebase"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ljharb/rebase@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
is-map-2.0.2/.github/workflows/require-allow-edits.yml 0000664 0000000 0000000 00000000301 13765612213 0022717 0 ustar 00root root 0000000 0000000 name: Require “Allow Edits”
on: [pull_request_target]
jobs:
_:
name: "Require “Allow Edits”"
runs-on: ubuntu-latest
steps:
- uses: ljharb/require-allow-edits@main
is-map-2.0.2/.gitignore 0000664 0000000 0000000 00000001745 13765612213 0014706 0 ustar 00root root 0000000 0000000 # Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# next.js build output
.next
# Only apps should have lockfiles
npm-shrinkwrap.json
package-lock.json
yarn.lock
is-map-2.0.2/.npmignore 0000664 0000000 0000000 00000001770 13765612213 0014713 0 ustar 00root root 0000000 0000000 # Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# next.js build output
.next
# Only apps should have lockfiles
npm-shrinkwrap.json
package-lock.json
yarn.lock
.github/workflows
is-map-2.0.2/.npmrc 0000664 0000000 0000000 00000000067 13765612213 0014032 0 ustar 00root root 0000000 0000000 package-lock=false
allow-same-version=true
message=v%s
is-map-2.0.2/.nycrc 0000664 0000000 0000000 00000000330 13765612213 0014022 0 ustar 00root root 0000000 0000000 {
"all": true,
"check-coverage": false,
"reporter": ["text-summary", "text", "html", "json"],
"lines": 86,
"statements": 85.93,
"functions": 82.43,
"branches": 76.06,
"exclude": [
"coverage",
"test"
]
}
is-map-2.0.2/CHANGELOG.md 0000664 0000000 0000000 00000012231 13765612213 0014517 0 ustar 00root root 0000000 0000000 # Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v2.0.2](https://github.com/inspect-js/is-map/compare/v2.0.1...v2.0.2) - 2020-12-13
### Commits
- [Tests] migrate tests to Github Actions [`349a036`](https://github.com/inspect-js/is-map/commit/349a0362a744d024937a4356134389cbebf0c1a7)
- [meta] do not publish github action workflow files [`f473ae7`](https://github.com/inspect-js/is-map/commit/f473ae777d15c5d247002f5aaa52ed4ada3a5dd4)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `es6-shim`, `object-inspect`, `tape` [`12dbda3`](https://github.com/inspect-js/is-map/commit/12dbda37a97c0dab0a3874a6cff086cd44f1c94c)
- [Tests] run `nyc` on all tests; use `tape` runner; add `core-js` tests [`b280737`](https://github.com/inspect-js/is-map/commit/b280737c513588fef4b88c16328627744c8ab946)
- [actions] add "Allow Edits" workflow [`d8dcf17`](https://github.com/inspect-js/is-map/commit/d8dcf17dd6b1cc09b8de369aa87188f469297b7c)
- [readme] remove travis badge [`eab86f9`](https://github.com/inspect-js/is-map/commit/eab86f94cca4941861784e5eb8b7ca05e847e0b5)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`9c87af5`](https://github.com/inspect-js/is-map/commit/9c87af5008a4ff79bffc3a6de55bf2d65979db6d)
- [actions] switch Automatic Rease workflow to `pull_request_tarbget` event [`71647b8`](https://github.com/inspect-js/is-map/commit/71647b805066ecbc096d5742fd69046d22f2b5c4)
- [Dev Deps] update `es5-shim`, `tape` [`3a91230`](https://github.com/inspect-js/is-map/commit/3a912305d7d836e8d6e4f80e9047e3beff8ea887)
- [Dev Deps] update `auto-changelog`; add `aud` [`d3cd3da`](https://github.com/inspect-js/is-map/commit/d3cd3da9008756a02c2b26b45292c477bf9594a9)
- [Tests] only audit prod deps [`83ef327`](https://github.com/inspect-js/is-map/commit/83ef327c62d54a48193bf95ed8cb6c4dff0a2035)
- [meta] normalize line endings [`81a9eec`](https://github.com/inspect-js/is-map/commit/81a9eec713f8e309fa1f0ffb7e4b154c359b367b)
## [v2.0.1](https://github.com/inspect-js/is-map/compare/v2.0.0...v2.0.1) - 2019-12-17
### Fixed
- [Refactor] avoid top-level return, because babel and webpack are broken [`#5`](https://github.com/inspect-js/is-map/issues/5) [`#4`](https://github.com/inspect-js/is-map/issues/4) [`#3`](https://github.com/inspect-js/is-map/issues/3) [`#78`](https://github.com/inspect-js/node-deep-equal/issues/78) [`#7`](https://github.com/es-shims/Promise.allSettled/issues/7) [`#12`](https://github.com/airbnb/js-shims/issues/12)
### Commits
- [actions] add automatic rebasing / merge commit blocking [`743f29f`](https://github.com/inspect-js/is-map/commit/743f29fc527b4a8a56a7045ad3d56ecfc798b1a3)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`8ced854`](https://github.com/inspect-js/is-map/commit/8ced854c842c86cb126b86618cb4f90ef6a04f2b)
## [v2.0.0](https://github.com/inspect-js/is-map/compare/v1.0.1...v2.0.0) - 2019-11-12
### Commits
- Initial commit [`38592bc`](https://github.com/inspect-js/is-map/commit/38592bcb928d97b244cca6cee91142a44bcf5ab1)
- Tests [`ca54632`](https://github.com/inspect-js/is-map/commit/ca546326943385052e8b5a04377f1f8b110b7306)
- readme [`9ad8bb6`](https://github.com/inspect-js/is-map/commit/9ad8bb6bc2fb295ada21e1cd901c89aa55acad37)
- implementation [`03e1dbc`](https://github.com/inspect-js/is-map/commit/03e1dbc64eb09e6caba919c9ae5662992f0a9b52)
- npm init [`d05ce8b`](https://github.com/inspect-js/is-map/commit/d05ce8b0ad797c97ed23a7730a9e211e5fe0fe92)
- [meta] add `funding` field; create `FUNDING.yml` [`2d56b4e`](https://github.com/inspect-js/is-map/commit/2d56b4e2a44e6eb4557d9d192a863c92b68c6597)
- [meta] add `safe-publish-latest`, `auto-changelog` [`2ebecb5`](https://github.com/inspect-js/is-map/commit/2ebecb5a3fe5fa682d5d04d1cd87f4d88ba22ec9)
- [Tests] add `npm run lint` [`ddc3e32`](https://github.com/inspect-js/is-map/commit/ddc3e320c3d181b9111dd3a86df486604710e08c)
- [Tests] use shared travis-ci configs [`69f6d9c`](https://github.com/inspect-js/is-map/commit/69f6d9c52a06dda27419eb41572b8db6009f6d49)
- Only apps should have lockfiles [`408cccd`](https://github.com/inspect-js/is-map/commit/408cccdc824c017547573d816b2201e9cfb9a292)
- [Tests] add `npx aud` in `posttest` [`5eadb02`](https://github.com/inspect-js/is-map/commit/5eadb02075754732df3532bc2e98ca6307c46537)
## [v1.0.1](https://github.com/inspect-js/is-map/compare/v1.0.0...v1.0.1) - 2015-07-02
### Commits
- small tweaks [`2bd7622`](https://github.com/inspect-js/is-map/commit/2bd762263930d4f72eedd3a54678e1692062d53f)
- Add `related` section to readme [`3231e74`](https://github.com/inspect-js/is-map/commit/3231e748fbf1d4d7d1662b8a559e73cc1e69468b)
- Update license info in `readme.md` [`3a03b38`](https://github.com/inspect-js/is-map/commit/3a03b387b798d5eda09965dcf63e0c9fb9c7ddac)
- editorconfig: indent yml using 2 spaces [`d724177`](https://github.com/inspect-js/is-map/commit/d724177b7eb103174cd9ca1dce4a914e3dfdb1cd)
## v1.0.0 - 2015-02-18
### Commits
- init [`73b9f38`](https://github.com/inspect-js/is-map/commit/73b9f38e3d3c0435e639a7e054714d71b6ddae9b)
is-map-2.0.2/LICENSE 0000664 0000000 0000000 00000002053 13765612213 0013714 0 ustar 00root root 0000000 0000000 MIT License
Copyright (c) 2019 Inspect JS
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
is-map-2.0.2/README.md 0000664 0000000 0000000 00000002536 13765612213 0014174 0 ustar 00root root 0000000 0000000 # is-map [![Version Badge][2]][1]
[![dependency status][5]][6]
[![dev dependency status][7]][8]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][11]][1]
Is this value a JS Map? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
## Example
```js
var isMap = require('is-map');
assert(!isMap(function () {}));
assert(!isMap(null));
assert(!isMap(function* () { yield 42; return Infinity; });
assert(!isMap(Symbol('foo')));
assert(!isMap(1n));
assert(!isMap(Object(1n)));
assert(!isMap(new Set()));
assert(!isMap(new WeakSet()));
assert(!isMap(new WeakMap()));
assert(isMap(new Map()));
class MyMap extends Map {}
assert(isMap(new MyMap()));
```
## Tests
Simply clone the repo, `npm install`, and run `npm test`
[1]: https://npmjs.org/package/is-map
[2]: https://versionbadg.es/inspect-js/is-map.svg
[5]: https://david-dm.org/inspect-js/is-map.svg
[6]: https://david-dm.org/inspect-js/is-map
[7]: https://david-dm.org/inspect-js/is-map/dev-status.svg
[8]: https://david-dm.org/inspect-js/is-map#info=devDependencies
[11]: https://nodei.co/npm/is-map.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/is-map.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/is-map.svg
[downloads-url]: https://npm-stat.com/charts.html?package=is-map
is-map-2.0.2/index.js 0000664 0000000 0000000 00000001610 13765612213 0014352 0 ustar 00root root 0000000 0000000 'use strict';
var $Map = typeof Map === 'function' && Map.prototype ? Map : null;
var $Set = typeof Set === 'function' && Set.prototype ? Set : null;
var exported;
if (!$Map) {
// eslint-disable-next-line no-unused-vars
exported = function isMap(x) {
// `Map` is not present in this environment.
return false;
};
}
var $mapHas = $Map ? Map.prototype.has : null;
var $setHas = $Set ? Set.prototype.has : null;
if (!exported && !$mapHas) {
// eslint-disable-next-line no-unused-vars
exported = function isMap(x) {
// `Map` does not have a `has` method
return false;
};
}
module.exports = exported || function isMap(x) {
if (!x || typeof x !== 'object') {
return false;
}
try {
$mapHas.call(x);
if ($setHas) {
try {
$setHas.call(x);
} catch (e) {
return true;
}
}
return x instanceof $Map; // core-js workaround, pre-v2.5.0
} catch (e) {}
return false;
};
is-map-2.0.2/package.json 0000664 0000000 0000000 00000003350 13765612213 0015176 0 ustar 00root root 0000000 0000000 {
"name": "is-map",
"version": "2.0.2",
"description": "Is this value a JS Map? This module works cross-realm/iframe, and despite ES6 @@toStringTag.",
"main": "index.js",
"scripts": {
"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)\")\"",
"prepublish": "safe-publish-latest",
"pretest": "npm run lint",
"lint": "eslint --ext=js,mjs .",
"tests-only": "nyc tape 'test/**/*.js'",
"tests:shims": "nyc tape --require=es5-shim --require=es5-shim 'test/**/*.js'",
"tests:corejs": "nyc tape --require=core-js 'test/**/*.js'",
"test": "npm run tests-only && npm run tests:shims && npm run tests:corejs",
"posttest": "aud --production"
},
"repository": {
"type": "git",
"url": "git+https://github.com/inspect-js/is-map.git"
},
"keywords": [
"map",
"set",
"collection",
"is",
"robust"
],
"author": "Jordan Harband ",
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/inspect-js/is-map/issues"
},
"homepage": "https://github.com/inspect-js/is-map#readme",
"devDependencies": {
"@ljharb/eslint-config": "^17.3.0",
"aud": "^1.1.3",
"auto-changelog": "^2.2.1",
"core-js": "^2.6.12",
"es5-shim": "^4.5.14",
"es6-shim": "^0.35.6",
"eslint": "^7.15.0",
"for-each": "^0.3.3",
"nyc": "^10.3.2",
"object-inspect": "^1.9.0",
"safe-publish-latest": "^1.1.4",
"tape": "^5.0.1"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
}
}
is-map-2.0.2/test/ 0000775 0000000 0000000 00000000000 13765612213 0013666 5 ustar 00root root 0000000 0000000 is-map-2.0.2/test/index.js 0000664 0000000 0000000 00000002116 13765612213 0015333 0 ustar 00root root 0000000 0000000 'use strict';
var test = require('tape');
var debug = require('object-inspect');
var forEach = require('for-each');
var isMap = require('..');
test('non-collections', function (t) {
forEach([
null,
undefined,
true,
false,
42,
0,
-0,
NaN,
Infinity,
'',
'foo',
/a/g,
[],
{},
function () {}
], function (nonCollection) {
t.equal(isMap(nonCollection), false, debug(nonCollection) + ' is not a Map');
});
t.end();
});
test('Maps', { skip: typeof Map !== 'function' }, function (t) {
var m = new Map();
t.equal(isMap(m), true, debug(m) + ' is a Map');
t.end();
});
test('Sets', { skip: typeof Set !== 'function' }, function (t) {
var s = new Set();
t.equal(isMap(s), false, debug(s) + ' is not a Map');
t.end();
});
test('WeakMaps', { skip: typeof WeakMap !== 'function' }, function (t) {
var wm = new WeakMap();
t.equal(isMap(wm), false, debug(wm) + ' is not a Map');
t.end();
});
test('WeakSets', { skip: typeof WeakSet !== 'function' }, function (t) {
var ws = new WeakSet();
t.equal(isMap(ws), false, debug(ws) + ' is not a Map');
t.end();
});