@bitbar/deferred-promise
v1.0.0
Published
Simple jQuery Deferred port using native Promise
Downloads
2
Readme
Deferred Promise
Simple jQuery Deferred()
port using native Promise
.
Install
npm install --save @bitbar/deferred-promise
Use
const DeferredPromise = require('@bitbar/deferred-promise');
const first = new DeferredPromise();
const second = new DeferredPromise();
first.then( () => console.log('O, hello!') );
second.then( () => console.log('Yupi!') );
Promise.all([ first, second ]).then( () => console.log('Ow yeah!') );
setTimeout(first.resolve, 1000);
second.resolve();
License
This project is using ISC license.