Skip to content

Latest commit

 

History

History
35 lines (27 loc) · 506 Bytes

README.md

File metadata and controls

35 lines (27 loc) · 506 Bytes

rexolve

A lightweight Promise.all for Objects

Installation

npm install rexolve --save

API

const rexolve = require('rexolve');

Usage

// Object can be nested with arrays and objects indefinitely
rexolve({
    foo: Promise.resolve('bar')
}).then(result => {
    // result == { foo: 'bar' }
});

// Value caught would be the first error thrown
rexolve({
    foo: Promise.reject('bar')
}).catch(error => {
    // error == 'bar'
});

License

MIT