callback-pool
Simple utility to queue callbacks in a pool until the drain has been unplugged.
npm install callback-pool --save
Example
var pool = ;var myPool = pool;//creates a new pool //these are queued upmyPool;myPool; myPool;//all callbacks are executed asynchronously with 1 and 2. //these are now asynchronously executed immediately with 1 and 2myPool;myPool; myPool;//allows you to start over.