Simple queuing system
Non-blocking recursion-based queue for processing items in series
npm i shitty-queue
Initialize queue with an item-processor function and optional milliseconds to wait before processing next item - then just start requesting
Note: Processor must return a Promise
//Create your item-processor-functionconst item_processor = async { //-- Simulate 5-sec process -- console await console return `Result of `} //Init queue with processor and ms to wait between itemsconst queue = item_processor 100 //Add a bunch of requests and queuequeuequeuequeuequeue