• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2
3const common = require('../common');
4const stream = require('stream');
5const fs = require('fs');
6
7const readStream = fs.createReadStream(process.execPath);
8
9const transformStream = new stream.Transform({
10  transform: common.mustCall(() => {
11    readStream.unpipe();
12    readStream.resume();
13  })
14});
15
16readStream.on('end', common.mustCall());
17
18readStream
19  .pipe(transformStream)
20  .resume();
21