Socket
Socket
Sign inDemoInstall

is-set

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Protect your apps from supply chain attacks

Install

is-set

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

    2.0.2latest
    GitHub
    npm

Version published
Maintainers
1
Weekly downloads
12,769,679
decreased by-13.27%

Weekly downloads

Changelog

Source

v2.0.2 - 2020-12-13

Commits

Readme

Source

is-set Version Badge

dependency status dev dependency status 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

Keywords

FAQs

Last updated on 13 Dec 2020

Did you know?

Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc