source: imaps-frontend/node_modules/is-set/README.md

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 1.8 KB
RevLine 
[d565449]1# is-set <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
2
3[![github actions][actions-image]][actions-url]
4[![coverage][codecov-image]][codecov-url]
5[![License][license-image]][license-url]
6[![Downloads][downloads-image]][downloads-url]
7
8[![npm badge][npm-badge-png]][package-url]
9
10Is this value a JS Set? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
11
12## Example
13
14```js
15var isSet = require('is-set');
16assert(!isSet(function () {}));
17assert(!isSet(null));
18assert(!isSet(function* () { yield 42; return Infinity; });
19assert(!isSet(Symbol('foo')));
20assert(!isSet(1n));
21assert(!isSet(Object(1n)));
22
23assert(!isSet(new Map()));
24assert(!isSet(new WeakSet()));
25assert(!isSet(new WeakMap()));
26
27assert(isSet(new Set()));
28
29class MySet extends Set {}
30assert(isSet(new MySet()));
31```
32
33## Tests
34Simply clone the repo, `npm install`, and run `npm test`
35
36[package-url]: https://npmjs.org/package/is-set
37[npm-version-svg]: https://versionbadg.es/inspect-js/is-set.svg
38[deps-svg]: https://david-dm.org/inspect-js/is-set.svg
39[deps-url]: https://david-dm.org/inspect-js/is-set
40[dev-deps-svg]: https://david-dm.org/inspect-js/is-set/dev-status.svg
41[dev-deps-url]: https://david-dm.org/inspect-js/is-set#info=devDependencies
42[npm-badge-png]: https://nodei.co/npm/is-set.png?downloads=true&stars=true
43[license-image]: https://img.shields.io/npm/l/is-set.svg
44[license-url]: LICENSE
45[downloads-image]: https://img.shields.io/npm/dm/is-set.svg
46[downloads-url]: https://npm-stat.com/charts.html?package=is-set
47[codecov-image]: https://codecov.io/gh/inspect-js/is-set/branch/main/graphs/badge.svg
48[codecov-url]: https://app.codecov.io/gh/inspect-js/is-set/
49[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-set
50[actions-url]: https://github.com/inspect-js/is-set/actions
Note: See TracBrowser for help on using the repository browser.