This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { PassThrough, finished } = require('stream'); | |
| console.log('Waiting for stream to finish...'); | |
| finished(new PassThrough(), (err) => { | |
| // This callback is never called and the process exits with exit code 0 right away | |
| console.log('Stream has finished!', { err }); | |
| }); |
OlderNewer