iserror

Test whether value is error object

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
iserror
210.0.26 years ago6 years agoMinified + gzip package size for iserror in KB

Readme

iserror Build Status Coverage Status npm version
Test whether value is error object.

Installation

$ npm install iserror

API

const isError = require('iserror');

isError(new Error('Some error'));
// => true

isError({});
// => false

Running tests

$ npm test

License

MIT