Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
stream-combiner
Advanced tools
The stream-combiner npm package is used to combine multiple Node.js streams (readable or writable) into a single stream. This is particularly useful for managing stream pipelines and handling data transformations in a more organized and readable manner.
Stream Pipeline Creation
This code sample demonstrates how to create a stream pipeline using stream-combiner. It combines stdin, a decryption stream, a gzip compression stream, and stdout into a single stream pipeline. Errors in any part of the stream are handled by logging to the console.
const { combine } = require('stream-combiner');
const zlib = require('zlib');
const crypto = require('crypto');
const combinedStream = combine(
process.stdin,
crypto.createDecipher('aes192', 'a_secret'),
zlib.createGzip(),
process.stdout
);
combinedStream.on('error', console.error);
Pump is a small node module that pipes streams together and destroys all of them if one of them closes. Compared to stream-combiner, pump provides a similar functionality but with a focus on properly cleaning up the streams to avoid memory leaks, which is not explicitly handled by stream-combiner.
Multistream allows you to combine multiple streams into a single readable stream. It differs from stream-combiner in that it focuses more on sequential rather than parallel stream combination, making it suitable for scenarios where streams need to be processed one after another.
<img src=https://secure.travis-ci.org/dominictarr/stream-combiner.png?branch=master>
Turn a pipeline into a single stream. pipeline
returns a stream that writes to the first stream
and reads from the last stream.
Listening for 'error' will recieve errors from all streams inside the pipe.
var Combine = require('stream-combiner')
var es = require('event-stream')
Combine( //connect streams together with `pipe`
process.openStdin(), //open stdin
es.split(), //split stream to break on newlines
es.map(function (data, callback) {//turn this async function into a stream
callback(null
, inspect(JSON.parse(data))) //render it nicely
}),
process.stdout // pipe it to stdout !
)
MIT
FAQs
[![npm version](https://img.shields.io/npm/v/stream-combiner.svg)](https://npmjs.org/package/stream-combiner) [![Travis CI](https://travis-ci.org/dominictarr/stream-combiner.svg)](https://travis-ci.org/dominictarr/stream-combiner)
The npm package stream-combiner receives a total of 2,953,065 weekly downloads. As such, stream-combiner popularity was classified as popular.
We found that stream-combiner 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.