npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

miller-error

1.1.0

@yoshuawuyts

npmHomeRepoSnykSocket
Downloads:98
$ npm install miller-error
DailyWeeklyMonthlyYearly

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