Debian Codegraph @

polyfills/readable-stream/passthrough.js

raw
1
2 import {Transform} from './transform';
3
4 import {inherits} from 'util';
5 inherits(PassThrough, Transform);
6 export default PassThrough;
7 export function PassThrough(options) {
8 if (!(this instanceof PassThrough)) return new PassThrough(options);
9
10 Transform.call(this, options);
11 }
12
13 PassThrough.prototype._transform = function (chunk, encoding, cb) {
14 cb(null, chunk);
15 };