How to use the end-of-stream function in end-of-stream

To help you get started, we’ve selected a few end-of-stream examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github forivall / tacoscript / packages / tacoscript / src / cli / usage / index.js View on Github external
export default function usage(subcommand, cb) {
  let helpFileName = path.join(__dirname, (subcommand || "usage") + ".txt");
  let helpFileStream = fs.createReadStream(helpFileName);
  helpFileStream.pipe(process.stdout);
  eos(helpFileStream, () => { cb({code: 0}); });
}

end-of-stream

Call a callback when a readable/writable/duplex stream has completed or failed.

MIT
Latest version published 4 years ago

Package Health Score

67 / 100
Full package analysis

Popular end-of-stream functions