Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
@firanorg/alias-repellat-vero
Advanced tools
A little function that formats an error object as a nice, readable string. Works in node and the browser; in node, it will use [kleur](https://www.npmjs.com/package/kleur) to add ANSI color code escape sequences to the output string, to make it easier to
A little function that formats an error object as a nice, readable string. Works in node and the browser; in node, it will use kleur to add ANSI color code escape sequences to the output string, to make it easier to read.
unknown
in TypeScript)fs
errors; node sometimes puts the information about eg "which file couldn't be read" is sometimes in a property on the error, rather than in the error message, so by printing additional properties, it's guaranteed to be visible.npm install @firanorg/alias-repellat-vero
import { formatError } from "@firanorg/alias-repellat-vero";
const error = new Error("uh oh!");
error.context = {
user: "jeff",
session: "ewnj75hvj3v4tvmuy43er",
favoriteIceCreamFlavor: "pineapple",
};
console.log(formatError(error));
/*
Logs:
Error: uh oh!
at REPL2:1:9
The above error also had these properties on it:
{
context: {
user: 'jeff',
session: 'ewnj75hvj3v4tvmuy43er',
favoriteIceCreamFlavor: 'pineapple'
}
}
*/
MIT
FAQs
A little function that formats an error object as a nice, readable string. Works in node and the browser; in node, it will use [kleur](https://www.npmjs.com/package/kleur) to add ANSI color code escape sequences to the output string, to make it easier to
The npm package @firanorg/alias-repellat-vero receives a total of 0 weekly downloads. As such, @firanorg/alias-repellat-vero popularity was classified as not popular.
We found that @firanorg/alias-repellat-vero 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
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.