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.
A different style of callbacks experiment written for an answer on Stack Overflow:
It allows you to register callbacks to standard Node functions that expect error-fist callback style, but use a different convention inside of your callback - the first argument to your callback will either be an instance of Error
on failure (with its message
field set to the original error) or the first non-error argument on success.
For code examples see node-errc-example on GitHub.
Install to use in your Node project, updating the dependencies in package.json:
npm install errc --save
var errc = require('errc');
var fs = require('fs');
fs.readFile('example2.txt', errc(function (data) {
// here data is either an instance of Error on failure
// or a real data on success
});
For any bug reports or feature requests please post an issue on GitHub.
MIT License (Expat). See LICENSE.md for details.
FAQs
A different style of callbacks experiment
We found that errc 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.