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