combines floods of small stream writes while not delaying or buffering writes when not flooded. buffers only up to configured amount and only keeps buffer around for at most configured interval.
var fs =floody =ws = fs;var flood = ;// imaginary function that produces thousands of lines of datavar thousandsOfLines = ;flood;thousandsOfLines;// when you are doneflood;// to get data on flood writes to real writesconsole
let me know if you have issues or comments. i hope its useful.