Socket
Socket
Sign inDemoInstall

promise.hash.helper

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    promise.hash.helper

![CI](https://github.com/stefanpenner/promise.hash.helper/workflows/CI/badge.svg)


Version published
Weekly downloads
117K
increased by1.63%
Maintainers
1
Install size
6.50 kB
Created
Weekly downloads
 

Readme

Source

promise.hash.helper

CI

Inspired by Promise.all but rather then consuming an array it takes an object as input, and "resolves" that objects values.

Install

yarn add promise.hash.helper

or

npm install --save promise.hash.helper

Usage

const hash = require('promise.hash.helper');

let promises = {
  myPromise: resolve(1),
  yourPromise: resolve(2),
  theirPromise: resolve(3),
  notAPromise: 4
};

hash(promises).then(object => {
  // object here is an object that looks like:
  // {
  //   myPromise: 1,
  //   yourPromise: 2,
  //   theirPromise: 3,
  //   notAPromise: 4
  // }
});

FAQs

Last updated on 30 Aug 2021

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