1.1.0 • Published 10 years ago

miller-error v1.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

miller-error

NPM version build status Test coverage

Schema validator for error objects. Built with miller.

Installation

$ npm i --save miller-error

Overview

Validate an object. Either throws a TypeError or returns the same object.

var errSchema = require('miller-error');

errSchema({
  error: new Error('login error'),
  message: 'Whoops, something went wrong with the login',
  statusCode: 1
});

License

MIT © Yoshua Wuyts