1.0.0 • Published 6 years ago

@dex4er/stream.pipeline v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

stream.pipeline

Build Status npm

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.

Usage

Direct

const pipeline = require('@dex4er/stream.pipeline');
// Use `pipeline` just like the built-in method on `stream`

Shim

require('@dex4er/stream.pipeline/shim')();
// `stream.pipeline` is now defined
const stream = require('stream');
// Use `stream.pipeline`

or:

require('@dex4er/stream.pipeline/auto');
// `stream.pipeline` is now defined
const stream = require('stream');
// Use `stream.pipeline`

Warning

This package had to be named just stream.pipeline, but there is already some package with similar name and then I've got:

npm ERR! Package name too similar to existing packages; try renaming your package to '@dex4er/stream.pipeline' and publishing with 'npm publish --access=public' instead : stream.pipeline