How to use the mississippi.parallel function in mississippi

To help you get started, we’ve selected a few mississippi 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 plaid / async-problem / node-streams.js View on Github external
const main = () => {
  const path = join (process.argv[2]);
  let results;

  miss.pipe (
    fs.createReadStream (path ('index.txt')),
    split (),
    miss.parallel (123, (filename, cb) => readFile (path (filename)) (cb)),
    miss.concat (data => { results = data; }),
    err => { if (err != null) exit1 (err); else exit0 (results); }