
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
stream-composer
Advanced tools
Modern stream composer
npm install stream-composer
Supports composing and pipelining multiple streams into a single streamx stream.
const Composer = require('stream-composer')
// Make a duplex stream out of a read and write stream
const stream = new Composer()
stream.setReadable(someReadableStream) // set readable side
stream.setWritable(someWritableStream) // set writable side
// reads, read from the readable stream
stream.on('data', function (data) {
// data is from someReadableStream
})
// writes, write to the writable stream
stream.write(data)
stream = new Composer([options])
Make a new composer. Optionally pass the writable stream and readable stream in the constructor. Options are forwarded to streamx.
stream.setReadable(readableStream)
Set the readable stream. If you pass null
the readable stream will be set to an empty stream for you.
stream.setWritable(writableStream)
Set the writable stream. If you pass null
the writable stream will be set to an empty stream for you.
stream.setPipeline(...pipelineStreams)
Set the stream to a pipeline. Writing to the outer stream writes to the first stream in the pipeline and reading from the outer stream, reads from the last stream in the pipeline.
stream = Composer.pipeline(...pipelineStreams)
Helper for making a composer stream and setting the pipeline in one go.
stream = Composer.duplexer(writableStream, readableStream)
Helper for making a composer stream and setting the writable and readable stream in one go.
MIT
FAQs
Modern stream composer
The npm package stream-composer receives a total of 586,862 weekly downloads. As such, stream-composer popularity was classified as popular.
We found that stream-composer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.