(options = {})
| 4 | |
| 5 | export default class ReadToEnd extends Transform { |
| 6 | constructor(options = {}) { |
| 7 | super(options); |
| 8 | this._encoding = options.encoding || 'utf8'; |
| 9 | this._buffer = ''; |
| 10 | } |
| 11 | |
| 12 | _transform(chunk, encoding, done) { |
| 13 | this._buffer += chunk.toString(this._encoding); |