{"name":"stream-composer","version":"1.0.1","description":"Modern stream composer","main":"index.js","dependencies":{"streamx":"^2.13.2"},"devDependencies":{"brittle":"^3.2.1","standard":"^17.0.0"},"scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/stream-composer.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/stream-composer/issues"},"homepage":"https://github.com/mafintosh/stream-composer","gitHead":"84fb8811a05f60e0cfc1d032ec0f76d534f896a1","_id":"stream-composer@1.0.1","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-716DcIqp68e6qXFMKqBIUJg2mMyvMxMMRu6lG9tB47gwOjLDBm52RcPYBt5ZMkUmCr+etG/L9PzXsmtOYy/gFg==","shasum":"d9d3192c353935253d06bfd15f943924de51d4e6","tarball":"http://registry-npm.ywwl.com/stream-composer/download/stream-composer-1.0.1.tgz","fileCount":6,"unpackedSize":13077,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC1lWtohIZAgj0Q/l0U9ckUKBJlImr7rtqoVrrXVacxZAIgcqPNzQR0LXdHKLHxsI1kYjQ2f6J7VfPPMgEN7Yn2o1k="}],"size":3564,"noattachment":false,"key":"/stream-composer/-/stream-composer-1.0.1.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stream-composer_1.0.1_1685578894639_0.3446350059786749"},"_hasShrinkwrap":false,"readme":"# stream-composer\n\nModern stream composer\n\n```\nnpm install stream-composer\n```\n\nSupports composing and pipelining multiple streams into a single [streamx](https://github.com/mafintosh/streamx) stream.\n\n## Usage\n\n``` js\nconst Composer = require('stream-composer')\n\n// Make a duplex stream out of a read and write stream\nconst stream = new Composer()\n\nstream.setReadable(someReadableStream) // set readable side\nstream.setWritable(someWritableStream) // set writable side\n\n// reads, read from the readable stream\nstream.on('data', function (data) {\n  // data is from someReadableStream\n})\n\n// writes, write to the writable stream\nstream.write(data)\n```\n\n## API\n\n#### `stream = new Composer([options])`\n\nMake a new composer. Optionally pass the writable stream and readable stream in the constructor.\nOptions are forwarded to streamx.\n\n#### `stream.setReadable(readableStream)`\n\nSet the readable stream. If you pass `null` the readable stream will be set to an empty stream for you.\n\n#### `stream.setWritable(writableStream)`\n\nSet the writable stream. If you pass `null` the writable stream will be set to an empty stream for you.\n\n#### `stream.setPipeline(...pipelineStreams)`\n\nSet the stream to a pipeline. Writing to the outer stream writes to the first stream in the pipeline\nand reading from the outer stream, reads from the last stream in the pipeline.\n\n#### `stream = Composer.pipeline(...pipelineStreams)`\n\nHelper for making a composer stream and setting the pipeline in one go.\n\n#### `stream = Composer.duplexer(writableStream, readableStream)`\n\nHelper for making a composer stream and setting the writable and readable stream in one go.\n\n## License\n\nMIT\n","publish_time":1685578894814,"_cnpm_publish_time":1685578894814,"dist-tags":{"latest":"1.0.2"}}