Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 9, 2024 via pnpm

pretty-error 4.0.0

See nodejs errors with less clutter
Package summary
Share
0
issues
3
licenses
9
MIT
7
BSD-2-Clause
1
ISC
Package created
8 Jan 2014
Version published
23 Oct 2021
Maintainers
1
Total deps
17
Direct deps
2
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
9 Packages, Including:
ansi-regex@5.0.1
dom-converter@0.2.0
dom-serializer@1.4.1
htmlparser2@6.1.0
lodash@4.17.21
pretty-error@4.0.0
renderkid@3.0.0
strip-ansi@6.0.1
utila@0.4.0

BSD 2-Clause "Simplified" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
hold-liable
Must
include-copyright
include-license
7 Packages, Including:
css-select@4.3.0
css-what@6.1.0
domelementtype@2.3.0
domhandler@4.3.1
domutils@2.8.0
entities@2.2.0
nth-check@2.1.1

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
boolbase@1.0.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

2
All Dependencies CSV
β“˜ This is a list of pretty-error 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
lodash4.17.21311.49 kBMIT
prod
renderkid3.0.036.04 kBMIT
prod

Visualizations

Frequently Asked Questions

What does pretty-error do?

Pretty-error is a small yet powerful tool designed to improve the readability and understanding of Node.js errors by presenting them in a less cluttered and visually appealing way. The package essentially does a conversion of error objects into HTML-like documents and employs RenderKid to render the documents using simple HTML/CSS-like commands. This allows errors to be exhibited in a more user-friendly manner, enhancing error traceability and debugging efficiency. It brings about an advancement over Node's conventional non-formatted errors, boosting productivity for developers working with Node.js.

How do you use pretty-error?

To make use of the 'pretty-error' package, first ensure you install it via npm using the command npm install pretty-error. There are several ways you can use the 'pretty-error' package in your code. Here are a few examples:

  1. Render an error with colors using:
var PrettyError = require('pretty-error');
var pe = new PrettyError();
var renderedError = pe.render(new Error('Some error message'));
console.log(renderedError);
  1. Render caught exceptions:
try {
   doSomethingThatThrowsAnError();
} catch (error) {
   console.log(pe.render(error));
}
  1. If you want pretty-error to render all errors, you can use the below shortcut:
require('pretty-error').start();

Additionally, the package allows for extensive customization, including shortening paths, skipping packages, and even personalizing the visual display of errors through theming.

Where are the pretty-error docs?

The documentation for the 'pretty-error' package can be found in the readme of its GitHub repository. Here, you'll find a comprehensive overview of the package, along with installation and usage guidance, examples, details about customization options, troubleshooting tips, and more.