simul
    TypeScript icon, indicating that this package has built-in type declarations

    0.1.0 • Public • Published

    Simul

    Build Status

    At the same time

    Create Node.js writable streams that process data in parallel.

    This should only be used for streams where chunks are completely independent.

    Example

    var simul = require('./index')
     
    var parallelWrite = function (data, enc, done) {
      setTimeout(function () {
        console.log(data.toString())
        done()
      }, Math.random() * 2000)
    }
     
    var writable = simul.extend(parallelWrite, 5, {objectMode: true})
    writable.write(1)
    writable.write(2)
    writable.write(3)
    writable.write(4)
    writable.write(5)
    writable.write(6)
    writable.end(7)
     
    // '4'
    // '1'
    // '3'
    // '2'
    // '5'
    // '6'
    // '7'

    Keywords

    none

    Install

    npm i simul

    DownloadsWeekly Downloads

    6

    Version

    0.1.0

    License

    MIT

    Last publish

    Collaborators

    • evansolomon