Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

async

Package Overview
Dependencies
Maintainers
1
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async - npm Package Compare versions

Comparing version 0.1.12 to 0.1.13

4

package.json

@@ -5,3 +5,3 @@ { "name": "async"

, "author": "Caolan McMahon"
, "version": "0.1.12"
, "version": "0.1.13"
, "repository" :

@@ -11,3 +11,3 @@ { "type" : "git"

}
, "bugs" : { "web" : "http://github.com/caolan/async/issues" }
, "bugs" : { "url" : "http://github.com/caolan/async/issues" }
, "licenses" :

@@ -14,0 +14,0 @@ [ { "type" : "MIT"

@@ -147,2 +147,28 @@ # Async.js

<a name="forEachLimit" />
### forEachLimit(arr, limit, iterator, callback)
The same as forEach only the iterator is applied to batches of items in the
array, in series. The next batch of iterators is only called once the current
one has completed processing.
__Arguments__
* arr - An array to iterate over.
* limit - How many items should be in each batch.
* iterator(item, callback) - A function to apply to each item in the array.
The iterator is passed a callback which must be called once it has completed.
* callback(err) - A callback which is called after all the iterator functions
have finished, or an error has occurred.
__Example__
// Assume documents is an array of JSON objects and requestApi is a
// function that interacts with a rate-limited REST api.
async.forEachLimit(documents, 20, requestApi, function(err){
// if any of the saves produced an error, err would equal that error
});
---------------------------------------
<a name="map" />

@@ -149,0 +175,0 @@ ### map(arr, iterator, callback)

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc