Skip to content

chubbyts/chubbyts-throwable-to-error

Folders and files

NameName
Last commit message
Last commit date

Latest commit

89235bd · Mar 4, 2025

History

29 Commits
Mar 4, 2025
May 9, 2023
Jun 17, 2024
Jun 9, 2022
Jan 3, 2025
Jan 4, 2025
Jan 3, 2025
Jan 3, 2025
Mar 4, 2025
Jun 9, 2022
Jun 17, 2024
Jan 4, 2025
Jan 3, 2025
Jun 17, 2024

Repository files navigation

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: 18

Installation

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

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

Usage

import { throwableToError } from '@chubbyts/chubbyts-throwable-to-error/dist/throwable-to-error';

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

Copyright

2025 Dominik Zogg

About

It converts any throwable into an Error.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published