index.js
function mergeFeatureCollectionStream (inputs) {
    var out = geojsonStream.stringify();
    inputs.forEach(function(file) {
        fs.createReadStream(file)
            .pipe(geojsonStream.parse())
            .pipe(out);
    });
    return out;
}
function mergeFeatureCollectionStream (inputs) {
    var out = geojsonStream.stringify();
    inputs.forEach(function(file) {
        fs.createReadStream(file)
            .pipe(geojsonStream.parse())
            .pipe(out);
    });
    return out;
}
function mergeFeatureCollectionStream ( inputs ) { var out = geojsonStream . stringify ( ) ; inputs . forEach ( function ( file ) { fs . createReadStream ( file ) . pipe ( geojsonStream . parse ( ) ) . pipe ( out ) ; } ) ; return out ; }
Merge GeoJSON files containing GeoJSON FeatureCollections
into a single stream of a FeatureCollection as a JSON string.

This is more limited than merge - it only supports FeatureCollections
as input - but more performant, since it can operate on GeoJSON files
larger than what you can keep in memory at one time.
@param {Array<string>} inputs a list of filenames of GeoJSON files
@returns {Stream} output: a stringified JSON of a FeatureCollection.
@example
var geojsonMerge = require('@mapbox/geojson-merge');

var mergedStream = geojsonMerge.mergeFeatureCollectionStream([
'features.geojson',
'otherFeatures.geojson'])

mergedStream.pipe(process.stdout);
Merge GeoJSON files containing GeoJSON FeatureCollections into a single stream of a FeatureCollection as a JSON string .