pretty-error

  • Version 3.0.4
  • Published
  • 58.1 kB
  • 2 dependencies
  • MIT license

Install

npm i pretty-error
yarn add pretty-error
pnpm add pretty-error

Overview

See nodejs errors with less clutter

Index

Namespaces

namespace pretty-error

module 'pretty-error' {}

    function start

    start: () => any;

      function stop

      stop: () => any;

        class ParsedError

        class ParsedError {}

          constructor

          constructor(error: Error);

            class PrettyError

            class PrettyError {}

              constructor

              constructor();

                method alias

                alias: (stringOrRx: string, alias: string) => PrettyError;

                  method appendStyle

                  appendStyle: (toAppend: Object) => PrettyError;

                    method config

                    config: (configObject: PrettyError.ConfigObject) => PrettyError;

                      method filter

                      filter: (callbacks: PrettyError.Callback) => PrettyError;

                        method filterParsedError

                        filterParsedError: (callbacks: PrettyError.Callback) => PrettyError;

                          method getObject

                          getObject: (e: Object) => Object;

                            method removeAlias

                            removeAlias: (stringOrRx: string) => PrettyError;

                              method removeAllAliases

                              removeAllAliases: () => PrettyError;

                                method removeAllFilters

                                removeAllFilters: () => PrettyError;

                                  method removeAllParsedErrorFilters

                                  removeAllParsedErrorFilters: () => PrettyError;

                                    method removeFilter

                                    removeFilter: (callbacks: PrettyError.Callback) => PrettyError;

                                      method removeParsedErrorFilter

                                      removeParsedErrorFilter: (callbacks: PrettyError.Callback) => PrettyError;

                                        method render

                                        render: (
                                        e: PrettyError.ParsedError,
                                        logIt?: boolean,
                                        useColors?: boolean
                                        ) => string;

                                          method setMaxItems

                                          setMaxItems: (maxItems: number) => PrettyError;

                                            method skip

                                            skip: (callbacks: PrettyError.Callback) => PrettyError;

                                              method skipNodeFiles

                                              skipNodeFiles: () => any;

                                                method skipPackage

                                                skipPackage: (...packages: string[]) => PrettyError;

                                                  method skipPath

                                                  skipPath: (...paths: string[]) => PrettyError;

                                                    method start

                                                    start: () => PrettyError;

                                                      method stop

                                                      stop: () => any;

                                                        method unskip

                                                        unskip: (callbacks: PrettyError.Callback) => PrettyError;

                                                          method unskipAll

                                                          unskipAll: () => PrettyError;

                                                            method unskipAllPackages

                                                            unskipAllPackages: () => PrettyError;

                                                              method unskipAllPaths

                                                              unskipAllPaths: () => PrettyError;

                                                                method unskipNodeFiles

                                                                unskipNodeFiles: () => any;

                                                                  method unskipPackage

                                                                  unskipPackage: (...packages: string[]) => PrettyError;

                                                                    method unskipPath

                                                                    unskipPath: (...paths: string[]) => PrettyError;

                                                                      method withColors

                                                                      withColors: () => PrettyError;

                                                                        method withoutColors

                                                                        withoutColors: () => PrettyError;

                                                                          interface ConfigObject

                                                                          interface ConfigObject {}

                                                                            property aliases

                                                                            aliases?: boolean | Object;

                                                                              property filters

                                                                              filters?: boolean | PrettyError.Callback | PrettyError.Callback[];

                                                                                property maxItems

                                                                                maxItems?: number;

                                                                                  property parsedErrorFilters

                                                                                  parsedErrorFilters?: boolean | PrettyError.Callback | PrettyError.Callback[];

                                                                                    property skip

                                                                                    skip?: boolean | PrettyError.Callback | PrettyError.Callback[];

                                                                                      property skipNodeFiles

                                                                                      skipNodeFiles?: boolean | any;

                                                                                        property skipPackages

                                                                                        skipPackages?: boolean | string[];

                                                                                          property skipPaths

                                                                                          skipPaths?: boolean | string[];

                                                                                            type Callback

                                                                                            type Callback = (traceLine: Object | any, lineNumber: number) => boolean;

                                                                                              Package Files (1)

                                                                                              Dependencies (2)

                                                                                              Dev Dependencies (5)

                                                                                              Peer Dependencies (0)

                                                                                              No peer dependencies.

                                                                                              Badge

                                                                                              To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                              You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/pretty-error.

                                                                                              • Markdown
                                                                                                [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/pretty-error)
                                                                                              • HTML
                                                                                                <a href="https://www.jsdocs.io/package/pretty-error"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>