Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

lib-checked-domain

groundwater10MIT0.0.0

Handle typed domain exceptions

readme

checked domain

Handle typed domain exceptions

install

npm install --save lib-checked-domain

usage

Catch known types, or throw when the type is unknown.

check(function () {
  // throw a *typed* exception
  throw check.Error('exit', 'bad exit')
})
.on('fail', function () {
  // handle 'fail' type
})
.on('exit', function () {
  // handle 'exit' type
})

see also