Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 8, 2024 via pnpm

merge2 1.4.1

Merge multiple streams into one stream in sequence or parallel.
Package summary
Share
0
issues
1
license
1
MIT
Package created
19 Oct 2014
Version published
3 Jun 2020
Maintainers
1
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:
merge2@1.4.1
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 merge2 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does merge2 do?

Merge2 is a powerful and user-friendly Node.js package hosted on npm that allows you to merge multiple streams into a single stream. This can be done either sequentially or in parallel. The merging of streams is a vital part of handling streaming data in applications, particularly when there's a need to consolidate different data sources or to organize various data processing tasks in a pipeline fashion.

How do you use merge2?

To use merge2, you need to first install it via npm:

npm install merge2

Once installed, you can include it in your JavaScript project:

const merge2 = require('merge2')

You can then use merge2 to merge different streams. For instance, the following example uses Gulp tasks, but the principle is the same if you're working with raw streams:

const gulp = require('gulp')
const merge2 = require('merge2')
const concat = require('gulp-concat')
const minifyHtml = require('gulp-minify-html')
const ngtemplate = require('gulp-ngtemplate')

gulp.task('app-js', function () {
  return merge2(
      gulp.src('static/src/tpl/*.html')
        .pipe(minifyHtml({empty: true}))
        .pipe(ngtemplate({
          module: 'genTemplates',
          standalone: true
        })
      ), gulp.src([
        'static/src/js/app.js',
        'static/src/js/locale_zh-cn.js',
        'static/src/js/router.js',
        'static/src/js/tools.js',
        'static/src/js/services.js',
        'static/src/js/filters.js',
        'static/src/js/directives.js',
        'static/src/js/controllers.js'
      ])
    )
    .pipe(concat('app.js'))
    .pipe(gulp.dest('static/dist/js/'))
})

You also have the ability to add more streams to your merge, define merging orders, and do nested merging with merge2.

Where are the merge2 docs?

The Merge2 documentation is available on its npm page. The readme file not only includes a basic introduction of the package, but it also provides several usage examples, explaining how to install merge2, merge different streams, and use options to affect how streams get merged. Please visit the merge2 npm page for complete documentation.