BatchQ
Simple queue implementation which calls a callback every time the capacity is reached
Example
var BatchQueue = ; var batchq = 5 { console //Will print [0,1,2,3,4]}; batchq;console; //Will be 1 as callback was executedbatchq;batch; //Forces the callback to run as capacity hasn't been reached