Socket
Socket
Sign inDemoInstall

map-stream-limit

Package Overview
Dependencies
2
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    map-stream-limit

Like map-stream but with concurrency limit


Version published
Weekly downloads
2.5K
decreased by-3.51%
Maintainers
1
Install size
29.8 kB
Created
Weekly downloads
 

Readme

Source

map-stream-limit

Like map-stream but with a concurrency limit.

Example

var map = require("map-stream-limit");

map(function(data, callback) {
	// Do some async stuff here
	// But limited to 5 at a time
}, 5);

API

map(asyncFn, limit)

Create a map-stream with the given asynchronous function but no more than the given limit will be running at any given time.

A "drain" event will be emitted when the internal buffer is empty and the last remaining item being processed is finished.

Installation

npm install map-stream-limit

FAQs

Last updated on 04 Sep 2014

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