rejected-promise
v1.0.0
Published
Make promises that can be rejected *and* unhandled
Downloads
5
Readme
rejected-promise
Make promises that can be rejected and unhandled (where Node doesn’t complain).
Install:
npm install rejected-promise
const RejectedPromise = require('rejected-promise');
// Implements all Promise APIs.
RejectedPromise.resolve(42);
RejectedPromise.reject(new Error('Meh'));
new RejectedPromise((resolve, reject) => {
// ...
});
// Silences `rejectedPromiseFromSomeSource`.
RejectedPromise.resolve(rejectedPromiseFromSomeSource);
License
MIT