
Security News
Potemkin Understanding in LLMs: New Study Reveals Flaws in AI Benchmarks
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
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 106 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.
Security News
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.