verifyd-error

Create custom error objects for Verifyd.

Usage no npm install needed!

<script type="module">
  import verifydError from 'https://cdn.skypack.dev/verifyd-error';
</script>

README

verifyd-error

Create custom error objects for Verifyd.

var MyError = require('verifyd-error')('MyError', { code: 'ENOENT' });
// or
var MyError = require('verifyd-error')('MyError', 501);

Create new errors with the resulting object. The first argument is the error message. The second is an object containing keys that will decorate the error, overriding any keys set by the factory.

Run Test

$ make test