Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

is-set

inspect-js107mMIT2.0.3TypeScript support: included

Is this value a JS Set? This module works cross-realm/iframe, and despite ES6 @@toStringTag.

map, set, collection, is, robust

readme

is-set Version Badge

github actions coverage License Downloads

npm badge

Is this value a JS Set? This module works cross-realm/iframe, and despite ES6 @@toStringTag.

Example

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

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

v2.0.3 - 2024-03-08

Commits

  • [actions] reuse common workflows 9d26ac6
  • [actions] use node/install instead of node/run; use codecov action 3c91325
  • add types 8fcc646
  • [Dev Deps] update eslint, @ljharb/eslint-config, object-inspect, safe-publish-latest, tape 91caa24
  • [readme] update URLs 130e57b
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, auto-changelog, es5-shim, object-inspect, tape 4d75ee2
  • [actions] remove redundant finisher 052fdce
  • [Dev Deps] update eslint, @ljharb/eslint-config, auto-changelog, core-js, es5-shim, object-inspect, safe-publish-latest, tape eb31797
  • [actions] update rebase action to use reusable workflow 8c478ba
  • [actions] update codecov uploader a0dac6b
  • [Dev Deps] update @ljharb/eslint-config, aud, es6-shim, object-inspect, tape 28d75a3
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, object-inspect, tape 7b2a4a7
  • [Dev Deps] update eslint, @ljharb/eslint-config, es5-shim, tape 20ce047
  • [readme] add actions and codecov badges e6e1796
  • [meta] add missing engines.node 9ed19af
  • [meta] use prepublishOnly script for npm 7+ 618f861
  • [readme] remove dead badges 76e890e
  • [meta] add sideEffects flag e21859b

v2.0.2 - 2020-12-13

Commits

  • [Tests] migrate tests to Github Actions 10a1a86
  • [meta] do not publish github action workflow files 9611423
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, auto-changelog, es6-shim, object-inspect, tape 7d4d9b3
  • [Tests] run nyc on all tests dff5fb6
  • [actions] add "Allow Edits" workflow 6bed76a
  • [readme] remove travis badge ee9e740
  • [Tests] add core-js tests 9ef1b4e
  • [Dev Deps] update eslint, @ljharb/eslint-config, tape 5661354
  • [actions] switch Automatic Rebase workflow to pull_request_target event 2cea69e
  • [Dev Deps] update es5-shim, tape 9e24b51
  • [Dev Deps] update auto-changelog; add aud 69ae556
  • Fix typo in README.md, Map -> Set 5fe826a
  • [Tests] only audit prod deps c7c67f6
  • [meta] normalize line endings 6ef4ebd

v2.0.1 - 2019-12-17

Fixed

  • [Refactor] avoid top-level return, because babel and webpack are broken #5 #4 #3 #78 #7 #12

Commits

  • [actions] add automatic rebasing / merge commit blocking db358ba
  • [Dev Deps] update eslint, @ljharb/eslint-config, tape 13e5083

v2.0.0 - 2019-11-12

Commits

v1.0.0 - 2015-02-18

Commits