JSPM

pause

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2671114
  • Score
    100M100P100Q225479F
  • License MIT

Pause a stream's data events

Package Exports

  • pause

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pause) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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