Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

README

        


Promises/A+ logo

# 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(...);
```