Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
A simple Node.js utility for handling errors
It's just an npm package, so use npm.
$ npm install --save handlerr
Handlerr provides a helper functions for wrapping Node.js-style callbacks. By
default, Handlerr will just use console.error
on a stack trace whenever an
error occurs. For more errors see handlers.
For example:
var handle = require('handlerr')
, fs = require('fs')
;
fs.readFile('myfile.txt', handle(function(file) {
console.log('myfile.txt is ' + file.length + ' characters long');
}));
If you prefer to throw errors, then you may use handle.throw
like so:
db.connect(handle.throw(function(db) {
// ...
}));
Alternatively, if you want to throw errors by default, you can just grab
.throw
in your require call:
var handle = require('handlerr').throw;
handle
: The default handler which will use console.error
to report any
errors.
handle.throw
: For errors that should stop the system. This will just
throw
any errors that come through.
handle.custom(handler)
: For creating custom error handlers. The handler
function takes an error argument.
FAQs
A simple Node.js utility for handling errors
The npm package handlerr receives a total of 0 weekly downloads. As such, handlerr popularity was classified as not popular.
We found that handlerr 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.