assoc-promise

1.0.0 • Public • Published

assoc-promise

Requires a Promise polyfill (e.g. require('es6-promise').polyfill()).

var passoc = require('assoc-promise');
 
passoc({
    foo: makePromise("foo"),
    bar: makePromise("bar"),
    baz: "baz"
}).then(function(res) {
    // object `res` contains same keys as the input object,
    // values are the resolved values.
}, function(err) {
    // called if any of the promises reject
});

Package Sidebar

Install

npm i assoc-promise

Weekly Downloads

1

Version

1.0.0

License

ISC

Last publish

Collaborators

  • jaz303