stream.pipeline-shim
Polyfill for stream.pipeline in node versions < v10
node v10.0.0 added support for a built-in stream.pipeline
:
https://github.com/nodejs/node/pull/19828
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.
Installation
npm install stream.pipeline-shim
Additionally for Typescript:
npm install -D @types/node
Usage
Direct
const pipeline = ;// Use `pipeline` just like the built-in method on `stream`
Typescript:
;// Use `pipeline` just like the built-in method on `stream`
Shim
;// `stream.pipeline` is now definedconst stream = ;// Use `stream.pipeline`
or:
;// `stream.pipeline` is now definedconst stream = ;// Use `stream.pipeline`
Typescript:
;;// `stream.pipeline` is now defined;// Use `stream.pipeline`
or:
;// `stream.pipeline` is now defined;// Use `stream.pipeline`
License
Copyright (c) 2018-2019 Piotr Roszatycki piotr.roszatycki@gmail.com
Copyright Node.js contributors. All rights reserved.
Copyright (c) 2014 Mathias Buus