tr.js 306 B

123456789101112
  1. var through = require('through2');
  2. module.exports = function (file, opts) {
  3. var data = '';
  4. return through(write, end);
  5. function write (buf, enc, next) { data += buf; next() }
  6. function end () {
  7. this.emit('error', new Error('there was error'))
  8. this.push(null);
  9. }
  10. };