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.
Simple mixin and a few other functions for working with js objects
mixin(target, ...sources) - Simple mixin that takes multiple sources.
Mixin does NOT copy non-enumerable properties. It returns target object.
var mixin = require('otools').mixin;
var opts = mixin({}, defaults, opts);
each(object, function) - Loops over object keys and values with an iterator function.
Each does NOT iterate over non-enumerable properties.
var each = require('otools').each;
var obj = { Hello: " World!", "Goodbye": " everybody!" };
each(obj, function(value, key) {
// this === obj
console.log(key, value);
});
// Hello World!
// Goodbye everbody!
eachOwn(object, function) - Only loops over own properties of the object
eachOwn
does NOT iterate over inherited properties or non-enumerable properties.
var eachOwn = require('otools').eachOwn;
var obj2 = Object.create(obj);
obj2.nothing = " to say."
// inherited from prototype
// obj2.Hello === ' World!'
eachOwn(obj2, function(value, key) {
console.log(key, value);
});
// Nothing to say!
FAQs
simple mixin and a few functions for working with js objects
We found that otools 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.