pause
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/pause package

0.1.0 • Public • Published

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

Setting up files...

This happens only once for a package version and shouldn’t take long.

Package Sidebar

Install

npm i pause

Weekly Downloads

3,335,364

Version

0.1.0

License

MIT

Last publish

Collaborators

  • dougwilson
  • jongleberry
  • tjholowaychuk