Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Apr 22, 2024 via pnpm

merge-stream 2.0.0

Create a stream that emits events from multiple other streams
Package summary
Share
0
issues
1
license
1
MIT
Package created
10 Jun 2013
Version published
23 May 2019
Maintainers
3
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
merge-stream@2.0.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of merge-stream 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does merge-stream do?

The merge-stream package is a popular npm module which is used to merge or interleave several other streams. By doing this, users can easily control and manage multiple data sources, allowing for more organized and efficient stream operations. It offers a unique capability to add streams dynamically and quickly identify whether the merged stream is empty. Having a merged stream is beneficial for aligning data sequences and facilitating simultaneous events.

How do you use merge-stream?

To utilize merge-stream in your JavaScript projects, you need to first install it using npm. Once installed, you can create a new stream using the mergeStream() method by passing your desired streams as parameters.

A fundamental JavaScript code example demonstrating how to merge streams using merge-stream is as follows:

var stream1 = new Stream();
var stream2 = new Stream();

var merged = mergeStream(stream1, stream2);

var stream3 = new Stream();
merged.add(stream3);
merged.isEmpty();  //returns false if the merged stream is not empty.

In addition, you can also make use of merge-stream in a Gulp task for combining parts of tasks. Here's an example that shows how to do that:

const gulp = require('gulp');
const htmlValidator = require('gulp-w3c-html-validator');
const jsHint =  require('gulp-jshint');
const mergeStream =  require('merge-stream');

function lint() {
  return mergeStream(
    gulp.src('src/*.html').pipe(htmlValidator()).pipe(htmlValidator.reporter()),
    gulp.src('src/*.js').pipe(jsHint()).pipe(jsHint.reporter())
  );
}

gulp.task('lint', lint);

Where are the merge-stream docs?

The documentation of merge-stream is found within the README file in its GitHub repository - grncdr/merge-stream. This comprehensive document provides an overview of the package, code examples, and the API details, including descriptions of key methods and functionalities. The README serves as an excellent resource for getting acquainted with merge-stream, and using it to the fullest extent in your JavaScript projects.