hoek-boom
+ a few additions
Introduction
This library extends Hoek and exposes Boom.
Additional Features
On top of the already exposed Hoek module API.
assertBoom( condition, message, errorName )
var a = 1, b = 2;
HoekBoom.assertBoom(a === b, 'a should equal b', 'expectationFailed');
HoekBoom.assertBoom();
HoekBoom.assertBoom(a === b);
HoekBoom.assertBoom(a === b, new Error('example'));
HoekBoom.assertBoom(a === b, 'badRequest');
HoekBoom.assertBoom(a === b, 'some message');
HoekBoom.assertBoom(a === b, 'some', 'message', new Error('here'), 'for all', {test: 'lolz'});
HoekBoom.assertBoom(a === b, 'some', 'message');
HoekBoom.assertBoom(a === b, 'check the docs', 'badRequest');
HoekBoom.assertBoom(a === b, 'check the docs', {username: 'johnsmith'}, 'badRequest');
HoekBoom.assertBoom(a === b, 'invalid password', 'sample', {username: 'johnsmith'}, 'unauthorized');
Boom
var Boom = HoekBoom.Boom;
reply(Boom.notFound('stuff wasn\'t found here'));