🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

pause

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pause

Pause a stream's data events

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
6.1M
-1.7%
Maintainers
3
Weekly downloads
 
Created
Source

pause

NPM Version NPM Downloads Node.js Version Build Status Test Coverage

Pause a stream's data events

Installation

$ npm install pause

API

var pause = require('pause')

handle = pause(stream)

Pause the data events on a stream and return a handle to resume or end the stream.

handle.end()

Dispose of the handle. This does not end the stream, but it simply discards the event collection, making handle.resume() a no-op.

handle.resume()

Resume the stream by re-emitting all the data events in the same order, followed by an end event, if that was emitting during the pause.

License

MIT

FAQs

Package last updated on 02 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts