pax_global_header 0000666 0000000 0000000 00000000064 13765505504 0014524 g ustar 00root root 0000000 0000000 52 comment=fb6026d7dd4d50288d6dbeb6c53165ade89cc568
is-set-2.0.2/ 0000775 0000000 0000000 00000000000 13765505504 0012731 5 ustar 00root root 0000000 0000000 is-set-2.0.2/.eslintignore 0000664 0000000 0000000 00000000012 13765505504 0015425 0 ustar 00root root 0000000 0000000 coverage/
is-set-2.0.2/.eslintrc 0000664 0000000 0000000 00000000242 13765505504 0014553 0 ustar 00root root 0000000 0000000 {
"root": true,
"extends": "@ljharb",
"overrides": [
{
"files": "test/**",
"globals": {
"WeakMap": false,
"WeakSet": false,
},
},
],
}
is-set-2.0.2/.gitattributes 0000664 0000000 0000000 00000000014 13765505504 0015617 0 ustar 00root root 0000000 0000000 * text=auto
is-set-2.0.2/.github/ 0000775 0000000 0000000 00000000000 13765505504 0014271 5 ustar 00root root 0000000 0000000 is-set-2.0.2/.github/FUNDING.yml 0000664 0000000 0000000 00000001101 13765505504 0016077 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-set
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-set-2.0.2/.github/workflows/ 0000775 0000000 0000000 00000000000 13765505504 0016326 5 ustar 00root root 0000000 0000000 is-set-2.0.2/.github/workflows/node-4+.yml 0000664 0000000 0000000 00000003073 13765505504 0020215 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-set-2.0.2/.github/workflows/node-iojs.yml 0000664 0000000 0000000 00000003317 13765505504 0020744 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-set-2.0.2/.github/workflows/node-pretest.yml 0000664 0000000 0000000 00000001067 13765505504 0021466 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-set-2.0.2/.github/workflows/node-zero.yml 0000664 0000000 0000000 00000003665 13765505504 0020765 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-set-2.0.2/.github/workflows/rebase.yml 0000664 0000000 0000000 00000000401 13765505504 0020305 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-set-2.0.2/.github/workflows/require-allow-edits.yml 0000664 0000000 0000000 00000000301 13765505504 0022741 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-set-2.0.2/.gitignore 0000664 0000000 0000000 00000001745 13765505504 0014730 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-set-2.0.2/.npmignore 0000664 0000000 0000000 00000001770 13765505504 0014735 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-set-2.0.2/.npmrc 0000664 0000000 0000000 00000000067 13765505504 0014054 0 ustar 00root root 0000000 0000000 package-lock=false
allow-same-version=true
message=v%s
is-set-2.0.2/.nycrc 0000664 0000000 0000000 00000000330 13765505504 0014044 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-set-2.0.2/CHANGELOG.md 0000664 0000000 0000000 00000011414 13765505504 0014543 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-set/compare/v2.0.1...v2.0.2) - 2020-12-13
### Commits
- [Tests] migrate tests to Github Actions [`10a1a86`](https://github.com/inspect-js/is-set/commit/10a1a869d5f76921eed5bb7f1503be6f03eea8a2)
- [meta] do not publish github action workflow files [`9611423`](https://github.com/inspect-js/is-set/commit/9611423c4a6baa08a38f46ddafcca3ed4ea0ad97)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `es6-shim`, `object-inspect`, `tape` [`7d4d9b3`](https://github.com/inspect-js/is-set/commit/7d4d9b3ce8434a96c238cef62a7ce9ce79bd6079)
- [Tests] run `nyc` on all tests [`dff5fb6`](https://github.com/inspect-js/is-set/commit/dff5fb6cec206e51c6a7311fdb866bb0a0783b1a)
- [actions] add "Allow Edits" workflow [`6bed76a`](https://github.com/inspect-js/is-set/commit/6bed76af3119e489e622b3ea30807484dbb7fca9)
- [readme] remove travis badge [`ee9e740`](https://github.com/inspect-js/is-set/commit/ee9e74012ba35e86a4e92d7165548341d4323755)
- [Tests] add `core-js` tests [`9ef1b4e`](https://github.com/inspect-js/is-set/commit/9ef1b4ed0e55cec4154189247b6d7f6ad570e2f1)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`5661354`](https://github.com/inspect-js/is-set/commit/5661354f7a9861998257fdacfa9975feae9415b8)
- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`2cea69e`](https://github.com/inspect-js/is-set/commit/2cea69e16f64d7e706945010e03401a0a66507a3)
- [Dev Deps] update `es5-shim`, `tape` [`9e24b51`](https://github.com/inspect-js/is-set/commit/9e24b5158a0490c6b94deb31e76b06337eaafce6)
- [Dev Deps] update `auto-changelog`; add `aud` [`69ae556`](https://github.com/inspect-js/is-set/commit/69ae5561fe2408f301479dfa65dac0255e16952e)
- Fix typo in README.md, Map -> Set [`5fe826a`](https://github.com/inspect-js/is-set/commit/5fe826a1e11bf810b7174e2dfaf893a5682511d4)
- [Tests] only audit prod deps [`c7c67f6`](https://github.com/inspect-js/is-set/commit/c7c67f6b1a32b2b24709d733a6681cbe1ec67640)
- [meta] normalize line endings [`6ef4ebd`](https://github.com/inspect-js/is-set/commit/6ef4ebdf090bdf1f42eb912b6af2cf31df4abaef)
## [v2.0.1](https://github.com/inspect-js/is-set/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-set/issues/5) [`#4`](https://github.com/inspect-js/is-set/issues/4) [`#3`](https://github.com/inspect-js/is-set/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 [`db358ba`](https://github.com/inspect-js/is-set/commit/db358ba503aa86fe2d375e188dcdfa7174a070c8)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`13e5083`](https://github.com/inspect-js/is-set/commit/13e50834eacb1c1830feb598da70ca6d0c53d2f7)
## [v2.0.0](https://github.com/inspect-js/is-set/compare/v1.0.0...v2.0.0) - 2019-11-12
### Commits
- Initial commit [`0299bc8`](https://github.com/inspect-js/is-set/commit/0299bc8fce41dce4586ac2f79c73802ad6a72c3d)
- Tests [`dec24eb`](https://github.com/inspect-js/is-set/commit/dec24eb0b9f57f14be8eedd0e572f94f81572e82)
- readme [`9b16e7f`](https://github.com/inspect-js/is-set/commit/9b16e7ff417b5c7be9829f22e32249d737bb8f6e)
- implementation [`3da6156`](https://github.com/inspect-js/is-set/commit/3da6156dae02e71d541bc8a0d3b751734b98e06d)
- npm init [`89fdc8b`](https://github.com/inspect-js/is-set/commit/89fdc8b3d980f6ca414f71dff2af38ed102321a1)
- [meta] add `funding` field; create `FUNDING.yml` [`77f2be9`](https://github.com/inspect-js/is-set/commit/77f2be9f281439472f81a0378632bc5eeb25a79b)
- [meta] add `safe-publish-latest`, `auto-changelog` [`cef1b4c`](https://github.com/inspect-js/is-set/commit/cef1b4cef15c565e76e3d46e66087821c4c437ae)
- [Tests] add `npm run lint` [`2a8284c`](https://github.com/inspect-js/is-set/commit/2a8284c6d2265ecd5c98bd4a008a82f0b519cd0a)
- [Tests] use shared travis-ci configs [`d2e342f`](https://github.com/inspect-js/is-set/commit/d2e342f3b8477cc74bcab44297d20d10fcf3718b)
- Only apps should have lockfiles [`624072b`](https://github.com/inspect-js/is-set/commit/624072b92774aaa6d851837c882181995d88ece8)
- [Tests] add `npx aud` in `posttest` [`214247c`](https://github.com/inspect-js/is-set/commit/214247c3fcd61b164c18b56524cdc183fc485450)
## v1.0.0 - 2015-02-18
### Commits
- init [`2f11646`](https://github.com/inspect-js/is-set/commit/2f1164617bee9c05c0f7ffae8fca2feed13bade7)
is-set-2.0.2/LICENSE 0000664 0000000 0000000 00000002053 13765505504 0013736 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-set-2.0.2/README.md 0000664 0000000 0000000 00000002536 13765505504 0014216 0 ustar 00root root 0000000 0000000 # is-set [![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 Set? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
## Example
```js
var isSet = require('is-set');
assert(!isSet(function () {}));
assert(!isSet(null));
assert(!isSet(function* () { yield 42; return Infinity; });
assert(!isSet(Symbol('foo')));
assert(!isSet(1n));
assert(!isSet(Object(1n)));
assert(!isSet(new Map()));
assert(!isSet(new WeakSet()));
assert(!isSet(new WeakMap()));
assert(isSet(new Set()));
class MySet extends Set {}
assert(isSet(new MySet()));
```
## Tests
Simply clone the repo, `npm install`, and run `npm test`
[1]: https://npmjs.org/package/is-set
[2]: https://versionbadg.es/inspect-js/is-set.svg
[5]: https://david-dm.org/inspect-js/is-set.svg
[6]: https://david-dm.org/inspect-js/is-set
[7]: https://david-dm.org/inspect-js/is-set/dev-status.svg
[8]: https://david-dm.org/inspect-js/is-set#info=devDependencies
[11]: https://nodei.co/npm/is-set.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/is-set.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/is-set.svg
[downloads-url]: https://npm-stat.com/charts.html?package=is-set
is-set-2.0.2/index.js 0000664 0000000 0000000 00000001610 13765505504 0014374 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 (!$Set) {
// eslint-disable-next-line no-unused-vars
exported = function isSet(x) {
// `Set` is not present in this environment.
return false;
};
}
var $mapHas = $Map ? Map.prototype.has : null;
var $setHas = $Set ? Set.prototype.has : null;
if (!exported && !$setHas) {
// eslint-disable-next-line no-unused-vars
exported = function isSet(x) {
// `Set` does not have a `has` method
return false;
};
}
module.exports = exported || function isSet(x) {
if (!x || typeof x !== 'object') {
return false;
}
try {
$setHas.call(x);
if ($mapHas) {
try {
$mapHas.call(x);
} catch (e) {
return true;
}
}
return x instanceof $Set; // core-js workaround, pre-v2.5.0
} catch (e) {}
return false;
};
is-set-2.0.2/package.json 0000664 0000000 0000000 00000003337 13765505504 0015225 0 ustar 00root root 0000000 0000000 {
"name": "is-set",
"version": "2.0.2",
"description": "Is this value a JS Set? 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 .",
"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": "npx aud --production"
},
"repository": {
"type": "git",
"url": "git+https://github.com/inspect-js/is-set.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-set/issues"
},
"homepage": "https://github.com/inspect-js/is-set#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-set-2.0.2/test/ 0000775 0000000 0000000 00000000000 13765505504 0013710 5 ustar 00root root 0000000 0000000 is-set-2.0.2/test/index.js 0000664 0000000 0000000 00000002116 13765505504 0015355 0 ustar 00root root 0000000 0000000 'use strict';
var test = require('tape');
var debug = require('object-inspect');
var forEach = require('for-each');
var isSet = require('..');
test('non-collections', function (t) {
forEach([
null,
undefined,
true,
false,
42,
0,
-0,
NaN,
Infinity,
'',
'foo',
/a/g,
[],
{},
function () {}
], function (nonCollection) {
t.equal(isSet(nonCollection), false, debug(nonCollection) + ' is not a Set');
});
t.end();
});
test('Maps', { skip: typeof Map !== 'function' }, function (t) {
var m = new Map();
t.equal(isSet(m), false, debug(m) + ' is not a Set');
t.end();
});
test('Sets', { skip: typeof Set !== 'function' }, function (t) {
var s = new Set();
t.equal(isSet(s), true, debug(s) + ' is a Set');
t.end();
});
test('WeakMaps', { skip: typeof WeakMap !== 'function' }, function (t) {
var wm = new WeakMap();
t.equal(isSet(wm), false, debug(wm) + ' is not a Set');
t.end();
});
test('WeakSets', { skip: typeof WeakSet !== 'function' }, function (t) {
var ws = new WeakSet();
t.equal(isSet(ws), false, debug(ws) + ' is not a Set');
t.end();
});