@chubbyts/chubbyts-throwable-to-error

1.2.1 • Public • Published

chubbyts-throwable-to-error

CI Coverage Status Infection MSI npm-version

bugs code_smells coverage duplicated_lines_density ncloc sqale_rating alert_status reliability_rating security_rating sqale_index vulnerabilities

Description

It converts any throwable into an Error.

Requirements

  • node: 16

Installation

Through NPM as @chubbyts/chubbyts-throwable-to-error.

npm i @chubbyts/chubbyts-throwable-to-error@^1.2.1

Usage

try {
   throw {key: 'value'};
} catch (e) {
  const error = throwableToError(e);
}

Copyright

2023 Dominik Zogg

/@chubbyts/chubbyts-throwable-to-error/

    Package Sidebar

    Install

    npm i @chubbyts/chubbyts-throwable-to-error

    Weekly Downloads

    290

    Version

    1.2.1

    License

    MIT

    Unpacked Size

    7.15 kB

    Total Files

    6

    Last publish

    Collaborators

    • dominikzogg