1.1.0 • Published 10 years ago
miller-error v1.1.0
miller-error
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
});