@chubbyts/chubbyts-throwable-to-error
v1.3.2
Published
It converts any throwable into an Error.
Downloads
1,119
Readme
chubbyts-throwable-to-error
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