It converts any throwable into an Error.
- node: 16
Through NPM as @chubbyts/chubbyts-throwable-to-error.
npm i @chubbyts/chubbyts-throwable-to-error@^1.2.1
try {
throw {key: 'value'};
} catch (e) {
const error = throwableToError(e);
}
2024 Dominik Zogg