Polyfill/shim for stream.pipeline in node versions < v10
npm install stream.pipeline-shim
 
Polyfill for stream.pipeline in node versions < v10
node v10.0.0 added support for a built-in stream.pipeline:
This package provides the built-in stream.pipeline in node v10.0.0 and later,
and a replacement in other environments.
This module requires Node >= 5.
This package implements the es-shim API
interface. It works in an ES5-supported environment and complies with the
spec.
``shell`
npm install stream.pipeline-shim
_Additionally for Typescript:_
`shell`
npm install -D @types/node
`jspipeline
const pipeline = require('stream.pipeline-shim');
// Use just like the built-in method on stream`
_Typescript:_
`tspipeline
import pipeline from 'stream.pipeline-shim';
// Use just like the built-in method on stream`
`jsstream.pipeline
require('stream.pipeline-shim/shim')();
// is now definedstream.pipeline
const stream = require('stream');
// Use `
or:
`jsstream.pipeline
require('stream.pipeline-shim/auto');
// is now definedstream.pipeline
const stream = require('stream');
// Use `
_Typescript:_
`jsstream.pipeline
import finishedShim from 'stream.pipeline-shim/shim';
finishedShim();
// is now definedstream.pipeline
import stream from 'stream';
// Use `
or:
`jsstream.pipeline
import 'stream.pipeline-shim/auto';
// is now definedstream.pipeline
import stream from 'stream';
// Use ``
Copyright (c) 2018-2019 Piotr Roszatycki
Copyright Node.js contributors. All rights reserved.
Copyright (c) 2014 Mathias Buus