Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
set-component
Advanced tools
Generic Set container
$ component install component/set
var Set = require('set');
var set = new Set;
set.add('foo');
set.add('foo');
set.add({ some: 'object' });
set.remove('foo');
set.values();
// => [{ some: 'object' }]
Set supports an .equals(other)
method when present,
for example you may then add two separate User
instances
that are identified as being the same via their name:
User.prototype.equals = function(user){
return this.name == user.name;
};
Create a new Set
.
Create a new Set
with values
array. Duplicates will be removed.
Add value
to the set.
Remove value
from the set, returning true when present,
otherwise returning false.
Check if value
is present.
Return an array of values.
Aliased as .toJSON()
.
Iterate each member and invoke fn(val)
.
Return the set size.
Empty the set and return the old values array.
Check if the set is empty.
Perform a union with set
and return a new Set
.
Perform an intersection with set
and return a new Set
.
MIT
FAQs
Set container
The npm package set-component receives a total of 51 weekly downloads. As such, set-component popularity was classified as not popular.
We found that set-component demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.