@chubbyts/chubbyts-throwable-to-error
v2.1.1
Published
It converts any throwable into an Error.
Downloads
1,482
Readme
chubbyts-throwable-to-error
Description
It converts any throwable into an Error.
Requirements
- node: 20
Installation
Through NPM as @chubbyts/chubbyts-throwable-to-error.
npm i @chubbyts/chubbyts-throwable-to-error@^2.1.1Usage
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
