hissyfit
v0.1.1
Published
Go on, throw one
Downloads
2
Readme
hissyfit
Really simple Error constructor for Javascript.
Install
npm install hissyfit
Why?
Because this looks so ugly:
throw Object.assign(new Error('Oops we haz problem'), {
name: 'StrangeError',
status: 500,
detail: quirkyState,
});
Instead, this:
import Err from 'hissyfit';
throw new Err({
name: 'NiceError',
message: 'Broken but beautiful',
status: 500,
detail: quirkyState,
});