staggerjs

1.2.0 • Public • Published

StaggerJS

Very light utility to stagger a list of async methods.

Install

npm i --save staggerjs

Usage

import stagger from 'staggerjs';
 
// asyncMethods is an array of functions that return a Promise
 
stagger(asyncMethods, { maxOngoingMethods: 10, perSecond: 30 });

Given a set of async methods, with staggerjs you can easily enforce a maximum number of ongoing methods (maxOngoingMethods) and also apply a throttle (perSecond).

Package Sidebar

Install

npm i staggerjs

Weekly Downloads

180

Version

1.2.0

License

ISC

Last publish

Collaborators

  • pedrodim
  • marcopiii
  • gabro
  • veej
  • giogonzo
  • tpetrucciani
  • malpenzibo
  • federico.ercoles