Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 3.51 KB

README.md

File metadata and controls

50 lines (36 loc) · 3.51 KB

chubbyts-throwable-to-error

CI Coverage Status Mutation testing badge 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

2024 Dominik Zogg