New Powerful Machines

    is-error

    2.2.2 • Public • Published

    is-error

    Detect whether a value is an error

    Example

    var isError = require("is-error");
     
    console.log(isError(new Error('hi'))) // true
    console.log(isError({ message: 'hi' })) // false

    Docs

    var bool = isError(maybeErr)

    is-error := (maybeErr: Any) => Boolean

    isError returns a boolean. it will detect whether the argument is an error or not.

    Installation

    npm install is-error

    Tests

    npm test

    Contributors

    • Raynos

    MIT Licensed

    Keywords

    none

    Install

    npm i is-error

    DownloadsWeekly Downloads

    228,120

    Version

    2.2.2

    License

    MIT

    Unpacked Size

    6.22 kB

    Total Files

    7

    Last publish

    Collaborators

    • jcorbin
    • kriskowal
    • mk-pmb
    • raynos