rollup-plugin-node-builtins
Version:
use node builtins in browser with rollup
16 lines (11 loc) • 371 B
JavaScript
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);
};