manage stdout and stderr so that they do not collide in the console
npm install @cool-blue/de-collide-consolestdout and stderr to work around a bug in Webstorm. Because the two streams are not coordinated this happens...
drain event will be emitted after the last member has been sent. Because the writes are asynchronous, the drain event needs to be used to unhook after all writes are completed, otherwise there would be collisions as the queue empties after being unhooked.
js
var Decollide = require('de-collide-console');
new Decollide(10);
Decollide.on('drain' ,() => {
Decollide.unhook();
});
``