map-stream-limit
Like map-stream but with concurrency limit
Last updated 6 years ago by parshap .
Public Domain · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install map-stream-limit 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.1.0                                ...           latest (6 years ago)

5 Versions

  • 1.1.0                                ...           6 years ago
  • 1.0.3                                ...           6 years ago
  • 1.0.2                                ...           7 years ago
  • 1.0.1                                ...           7 years ago
  • 1.0.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 10
Last Day 0
Last Week 9
Last Month 7
Dependencies (2)
Dev Dependencies (1)

Copyright 2014 - 2016 © taobao.org |