@chubbyts/chubbyts-throwable-to-error
v2.3.3
Published
It converts any throwable into an Error.
Downloads
1,273
Readme
chubbyts-throwable-to-error
Description
It converts any throwable into an Error.
Requirements
- node: 22
Installation
Through NPM as @chubbyts/chubbyts-throwable-to-error.
npm i @chubbyts/chubbyts-throwable-to-error@^2.3.3Usage
import { throwableToError } from '@chubbyts/chubbyts-throwable-to-error/dist/throwable-to-error';
try {
throw {key: 'value'};
} catch (e) {
const error = throwableToError(e);
}Copyright
2026 Dominik Zogg
