Need private packages and team management tools?Check out npm Teams »

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');

Install

npm i unhandled-rejection-promise

DownloadsWeekly Downloads

1

Version

0.0.1

License

ISC

Unpacked Size

1.55 kB

Total Files

4

Last publish

Collaborators

  • avatar