Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bitbar/deferred-promise
Simple port of jQuery Deffered() based on native Promise
https://github.com/bitbar/deferred-promise
deferred deferred-promise javascript nodejs promise promises
Last synced: about 2 months ago
JSON representation
Simple port of jQuery Deffered() based on native Promise
- Host: GitHub
- URL: https://github.com/bitbar/deferred-promise
- Owner: bitbar
- License: isc
- Archived: true
- Created: 2019-09-02T10:24:30.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-09-02T14:11:47.000Z (over 5 years ago)
- Last Synced: 2024-11-01T23:33:15.097Z (2 months ago)
- Topics: deferred, deferred-promise, javascript, nodejs, promise, promises
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Deferred Promise
Simple jQuery `Deferred()` port using native `Promise`.
## Install
```sh
npm install --save @bitbar/deferred-promise
```## Use
```js
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](LICENSE).