You can never have enough of these, right?
Small, zero dependency deferred utility based on ES2015 promises.
Does not include the promise polyfill, so you have to take care of it yourself folks.
npm install --save yaDeferred
const yaDeferred = require('yaDeferred');
yaDeferred()
.resolve(true)
.then(result => console.log(result));
yaDeferred.resolve()
resolves the promise with a given value and returns the promise
yaDeferred.reject()
rejects the promise with a given value and returns the promise
yaDeferred.then()
then is a direct call to the original promise then method
yaDeferred.catch()
catch is a direct call to the original promise catch method