{"name":"stream-composer","version":"0.0.0","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":"166648a4dc7cae93367a29763109c323f77eda36","_id":"stream-composer@0.0.0","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-4AZdYFQV3iL3ntSEr38TE5iWFJIZvJ//Jxz/WL8WlwpMZxRVxoHcLdhJFNqK10EH9pHySsiSSkofPKH/2ds3yw==","shasum":"39b10504370daf9ac686f1981f3da748a39520f3","tarball":"http://registry-npm.ywwl.com/stream-composer/download/stream-composer-0.0.0.tgz","fileCount":6,"unpackedSize":11784,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDo0iTJGWRCBzD/ay3aK4cPH9oZbJFX/r4SSblDX9XSIwIgOOerM0udEQIM4rs4QU52bdKEd6SwlcrDeL20JNAstGg="}],"size":3280,"noattachment":false,"key":"/stream-composer/-/stream-composer-0.0.0.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_0.0.0_1684679646336_0.649408058503411"},"_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":1684679646513,"_cnpm_publish_time":1684679646513,"dist-tags":{"latest":"1.0.2"}}