Front end of the Slack clone application.

1234567891011121314151617181920212223
  1. 'use strict';
  2. var util = require('util')
  3. , stream = require('stream')
  4. , Writable = stream.Writable
  5. , setImmediate = setImmediate || function (fn) { setTimeout(fn, 0) }
  6. ;
  7. module.exports = DevNull;
  8. util.inherits(DevNull, Writable);
  9. function DevNull (opts) {
  10. if (!(this instanceof DevNull)) return new DevNull(opts);
  11. opts = opts || {};
  12. Writable.call(this, opts);
  13. }
  14. DevNull.prototype._write = function (chunk, encoding, cb) {
  15. setImmediate(cb);
  16. }