
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
error-stringify
Advanced tools
Augment errors with `Error#toJSON` that preserves `name`, `message`, `stack` as well as any other normally stringified attribute.
Augment errors with Error#toJSON
that preserves name
, message
, stack
as well as any other
normally stringified attribute.
log.warn("error %j", error)
module.export
The usage vary between the following two extremes.
Pass what you need to control the behavior :)
require('error-stringify')()
Default behavior does not split stack traces, and includes only properties on the passed instance (enumerable or not).
options.target
parameter, or by the target
splitStackTrace
- booleanincludeProtoChain
- booleanvar AppError = require('./app-error-base');
require('error-stringify')({
target : AppError
splitStackTrace : true,
includeProtoChain : true
})
which is effectively the equivalent of:
var AppError = require('./app-error-base');
var options = {
splitStackTrace : true,
includeProtoChain : true
};
require('error-stringify')(options, AppError)
The later form is useful when you want to pick the options from a file and pass it as is, so you can pass the base Error constructor in the 2nd argument.
(see https://github.com/axios/axios/issues/6690)
require('error-stringify')({
allowOverrideToJSON : true
})
npm install error-stringify --save
MIT, and that's it
Happy coding :)
FAQs
Augment errors with `Error#toJSON` that preserves `name`, `message`, `stack` as well as any other normally stringified attribute.
The npm package error-stringify receives a total of 114 weekly downloads. As such, error-stringify popularity was classified as not popular.
We found that error-stringify demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.