Gathering detailed insights and metrics for es6-set
Gathering detailed insights and metrics for es6-set
Gathering detailed insights and metrics for es6-set
Gathering detailed insights and metrics for es6-set
npm install es6-set
Module System
Unable to determine the module system for this package.
Min. Node Version
Typescript Support
Node Version
NPM Version
46 Stars
118 Commits
9 Forks
3 Watching
1 Branches
1 Contributors
Updated on 21 Nov 2022
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-6.5%
504,850
Compared to previous day
Last week
3.3%
3,116,275
Compared to previous week
Last month
27.8%
11,579,856
Compared to previous month
Last year
-14.9%
121,548,212
Compared to previous year
6
7
Warning:
v0.1 version does not ensure O(1) algorithm complexity (but O(n)). This shortcoming will be addressed in v1.0
If you want to make sure your environment implements Set
, do:
1require("es6-set/implement");
If you'd like to use native version when it exists and fallback to polyfill if it doesn't, but without implementing Set
on global scope, do:
1var Set = require("es6-set");
If you strictly want to use polyfill even if native Set
exists, do:
1var Set = require("es6-set/polyfill");
$ npm install es6-set
To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: Browserify, Webmake or Webpack
Best is to refer to specification. Still if you want quick look, follow examples:
1var Set = require("es6-set"); 2 3var set = new Set(["raz", "dwa", {}]); 4 5set.size; // 3 6set.has("raz"); // true 7set.has("foo"); // false 8set.add("foo"); // set 9set.size; // 4 10set.has("foo"); // true 11set.has("dwa"); // true 12set.delete("dwa"); // true 13set.size; // 3 14 15set.forEach(function (value) { 16 // 'raz', {}, 'foo' iterated 17}); 18 19// FF nightly only: 20for (value of set) { 21 // 'raz', {}, 'foo' iterated 22} 23 24var iterator = set.values(); 25 26iterator.next(); // { done: false, value: 'raz' } 27iterator.next(); // { done: false, value: {} } 28iterator.next(); // { done: false, value: 'foo' } 29iterator.next(); // { done: true, value: undefined } 30 31set.clear(); // undefined 32set.size; // 0
$ npm test
To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.
No vulnerabilities found.
Reason
security policy file detected
Details
Reason
no dangerous workflow patterns detected
Reason
GitHub workflow tokens follow principle of least privilege
Details
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
badge detected: Passing
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
project is not fuzzed
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More