⏱ Limitor
A Future based rate limiter utility.
Use in combination with parallel
to ensure rate limits are not exceeded.
Install
yarn add limitor
Usage
/** * This example demonstrates how to group an array * of futures and ensure only the limit is executed * every second. * * Below, the first 2 futures will resolve instantly * and 1 second later the next 2 will resolve. */ const futures = of1 of1 of2 of2const limit = 2 // max 2 per second const limited = limit