index.js 316 B

12345678910111213141516171819
  1. 'use strict';
  2. var ogWrite = process.stdout.write;
  3. var muteStdout = { mute: mute, unmute: noop };
  4. function noop() {}
  5. function mute() {
  6. muteStdout.unmute = unmute;
  7. process.stdout.write = noop;
  8. }
  9. function unmute() {
  10. process.stdout.write = ogWrite;
  11. muteStdout.unmute = noop;
  12. }
  13. module.exports = muteStdout;