Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
unordered-set
Advanced tools
A couple of functions that make it easy to maintain an unordered set as an array in an efficient way
A couple of functions that make it easy to maintain an unordered set as an array in an efficient way
npm install unordered-set
var set = require('unordered-set')
var list = []
var a = {hello: 'world'}
var b = {hej: 'verden'}
set.add(list, a)
set.add(list, b)
console.log(list) // prints a and b
set.remove(list, a)
console.log(list) // prints b
Items are removed and added using the same technique as in unordered-array-remove making the removal/additions run in O(1).
set.add(list, item)
Add an item. Notes that this sets the property ._index
to a number. If you control the items you insert and this is performance critical it might be benefitial to set item._index = 0
in the item constructor as v8 tends to like that.
set.remove(list, item)
Remove an item from the set. Might change the order of the list as well.
bool = set.has(list, item)
Returns true
if the item is in the list and false
otherwise
MIT
FAQs
A couple of functions that make it easy to maintain an unordered set as an array in an efficient way
The npm package unordered-set receives a total of 1,943 weekly downloads. As such, unordered-set popularity was classified as popular.
We found that unordered-set 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.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.