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