Socket
Book a DemoInstallSign in
Socket

for-await

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

for-await

for-await A tiny JavaScript utility to write for-await. <img src="https://img.shields.io/npm/v/for-await.

npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

for-await

A tiny JavaScript utility to write for-await.

npm version Build Status Coverage Status dependencies Status Known Vulnerabilities

Install

npm install --save for-await
const forAwait = require('for-await');

Usage

forAwait((item) => {
  // iteration
}).of(asyncGenerator()).then(() => {
  // done
});

API

forAwait( fn:function ).of( source:asyncIterable|syncIterable ):Promise<undefined>

fn is called with item, index, source.

of returns a Promise that resolves when iteration has finished.

FAQs

Package last updated on 15 Jun 2017

Did you know?

Socket

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