Kills a child process created with spawn after X bytes are sent
Kills a child process created with spawn after X bytes are sent and emits an event.
npm install limit-spawn
This is a soft limit, meaning that after more than MAX data is received the process is closed and the 'max-limit-exceeded' is emitted. So this implies that you can receive more data than the limit (depending on the last chunk).
var spawn = spawnlimit =assert =child ps bytesReceived MAX_LIMIT;MAX_LIMIT = 100 * 1024; // 100 Kbchild =;;bytesReceived = 0;childstdout;childstderr;child;// shortly after the 'max-limit-exceeded' event is emitted the child dieschild;