Nocturnal Prancing Mosquito

    promise-all-props

    2.1.1 • Public • Published

    promise-all-props

    Travis Build Status LGTM Grade npm

    Inspired by bluebird's Promise.props.

    Like Promise.all but for object properties instead of iterated values. Returns a promise that is fulfilled when all the properties of the object are fulfilled. The promise's fulfillment value is an object with fulfilled values at respective keys to the original object. If any promise in the object rejects, the returned promise is rejected.

    Install

    Node.js:
    npm install promise-all-props --save

    Deno:
    https://deno.land/x/promise_all_props

    Usage example

    import promiseAllProps from 'promise-all-props';
    
    promiseAllProps({
      foo: Promise.resolve('foo'),
      bar: Promise.resolve('bar')
    }).then((result) => {
      console.log(result.foo, result.bar);
    });

    Install

    npm i promise-all-props

    DownloadsWeekly Downloads

    69

    Version

    2.1.1

    License

    ISC

    Unpacked Size

    3.35 kB

    Total Files

    4

    Last publish

    Collaborators

    • siilwyn