Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.
/ assert-or-boom Public archive

Assert or throw a Boom Error

Notifications You must be signed in to change notification settings

g-ongenae/assert-or-boom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Assert or Boom

code style: prettier

Assert or throw a Boom Error

Install

# With yarn
yarn add assert-or-boom
# Or with npm
npm i assert-or-boom

Use

const aOrB = require('assert-or-boom');
const boom = require('boom');

try {
  aOrB(true, 500, 'Internal Error');
} catch (err) {
  Boom.isBoom(err); // => true
}

Functions

Releases

No releases published

Packages

No packages published