Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/axelf4/promise-trap
🤞 Records promises enabling an easy Promise.all
https://github.com/axelf4/promise-trap
javascript-library promise
Last synced: 2 days ago
JSON representation
🤞 Records promises enabling an easy Promise.all
- Host: GitHub
- URL: https://github.com/axelf4/promise-trap
- Owner: axelf4
- License: isc
- Created: 2018-08-11T14:22:43.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-01-04T22:11:09.000Z (about 3 years ago)
- Last Synced: 2024-12-10T00:58:28.699Z (28 days ago)
- Topics: javascript-library, promise
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/promise-trap
- Size: 4.88 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# promise-trap [![Build Status](https://travis-ci.org/axelf4/promise-trap.svg?branch=master)](https://travis-ci.org/axelf4/promise-trap)
Records promises enabling an easy `Promise.all`.
## Example
```javascript
const proxy = promiseTrap(fetch);
proxy.all().then(() => {
// The two requests made below have resolved!
});
proxy(...); // Do some fetch requests
proxy(...);
```