npm.io
0.1.1 • Published 9 years ago

hissyfit

Licence
MIT
Version
0.1.1
Deps
0
Vulns
0
Weekly
0

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,
});