Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

stream.finished

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stream.finished - npm Package Compare versions

Comparing version 1.1.2 to 1.2.0

4

CHANGELOG.md
# Changelog
## v1.2.0 2019-05-08
* Support for promisify in Typescript.
## v1.1.2 2019-05-08

@@ -4,0 +8,0 @@

9

index.d.ts

@@ -7,11 +7,12 @@ /// <reference types="node" />

stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream,
callback: (err?: NodeJS.ErrnoException) => void
callback: (err?: NodeJS.ErrnoException | null) => void
): () => void;
declare namespace finished {
export function getPolyfill(): typeof finished;
export const implementation: typeof finished;
export function shim(): typeof finished;
function __promisify__(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream): Promise<void>;
function getPolyfill(): typeof finished;
const implementation: typeof finished;
function shim(): typeof finished;
}
export = finished;
{
"name": "stream.finished",
"version": "1.1.2",
"version": "1.2.0",
"description": "Polyfill/shim for stream.finished in node versions < v10",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -20,2 +20,14 @@ # stream.finished

## Installation
```shell
npm install stream.finished
```
_Additionally for Typescript:_
```shell
npm install -D @types/node
```
## Usage

@@ -30,2 +42,9 @@

_Typescript:_
```ts
import finished from 'stream.finished';
// Use `finished` just like the built-in method on `stream`
```
### Shim

@@ -48,1 +67,30 @@

```
_Typescript:_
```js
import finishedShim from 'stream.finished/shim';
finishedShim();
// `stream.finished` is now defined
import stream from 'stream';
// Use `stream.finished`
```
or:
```js
import 'stream.finished/auto';
// `stream.finished` is now defined
import stream from 'stream';
// Use `stream.finished`
```
## License
Copyright (c) 2018-2019 Piotr Roszatycki <piotr.roszatycki@gmail.com>
Copyright Node.js contributors. All rights reserved.
Copyright (c) 2014 Mathias Buus
[MIT](https://opensource.org/licenses/MIT)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc