0.1.7 • Published 6 years ago

baboom v0.1.7

Weekly downloads
6
License
MIT
Repository
github
Last release
6 years ago

baboom

Baboom is a wrapper for the Boom error library which simplifies the delivery of custom payloads. Rather than a message and data object, you can simply pass the payload to the constructor, or to one of Boom's static constructor methods.

##Constructor Example

const Baboom = require('baboom');

throw new Baboom({
  
  someKey: 'customValue',
  someData: {
    someBool: false
  }

}, {

  statusCode: 502

});

##Static Example

const Baboom = require('baboom');

throw Baboom.internal({
  message: 'If a message property is provided, it will also be used in constructed the Error object',
  someValue: 'The payload you specify here will be the exact JSON output.',
  someArray: [1,2,3,4]
});
0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago