0.1.1 • Published 7 years ago

hissyfit v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

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

7 years ago

0.1.0

7 years ago