unhandled-rejection-promise

0.0.1 • Public • Published

unhandled-rejection-promise

unhandledRejection promise to nodejs

API

Exports a object

on(listener)

The listener is a function called with error from unhandled promise. The error has a promise property with promise rejected.

Usage

on((error) => {
    assert(error.message === 'error');
    assert(error.promise);
});
 
    Promise.reject('error');

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i unhandled-rejection-promise

      Weekly Downloads

      1

      Version

      0.0.1

      License

      ISC

      Unpacked Size

      1.55 kB

      Total Files

      4

      Last publish

      Collaborators

      • cereceres