Socket
Socket
Sign inDemoInstall

promise-all

Package Overview
Dependencies
2
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    promise-all

A Promise.all but for Objects as well as Arrays


Version published
Maintainers
1
Install size
19.9 kB
Created

Readme

Source

promise-all

Build status NPM version js-xo-style

A Promise.all but for Objects as well as Arrays

Installation

Install promise-all using npm:

npm install --save promise-all

Usage

Module usage

var all = require('promise-all');

all({key1: Promise.resolve(false)})
  .then(function (val) {
    // val === {key1: false}
  });

all([Promise.resolve(false)])
  .then(function (val) {
    // val === [false]
  });

API

all(val)

NameTypeDescription
val`ArrayObject`

Returns: Promise, which resolves when all promises in the passed Object or Array are resolved.

License

MIT © Joakim Carlstein

Keywords

FAQs

Last updated on 14 Sep 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc