summaryrefslogtreecommitdiff
path: root/node_modules/rollup-plugin-node-polyfills/polyfills/readable-stream/passthrough.js
blob: 3436228c6f8fa8108b1c67e59a44843237727ef0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import {Transform} from './transform';

import {inherits} from 'util';
inherits(PassThrough, Transform);
export default PassThrough;
export function PassThrough(options) {
  if (!(this instanceof PassThrough)) return new PassThrough(options);

  Transform.call(this, options);
}

PassThrough.prototype._transform = function (chunk, encoding, cb) {
  cb(null, chunk);
};