# pause

> Pause a stream's data events

Latest version **0.1.0** (published 2015-07-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install pause
pnpm add pause
yarn add pause
bun add pause
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2015-07-02 |
| First published | 2012-07-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/pause) |
| Module format | CommonJS |
| Node | >= 0.6 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 27 |
| Author | TJ Holowaychuk |
| Maintainers | tjholowaychuk, jongleberry, dougwilson |

## Links

- npm: https://www.npmjs.com/package/pause
- Repository: https://github.com/stream-utils/pause
- Issues: https://github.com/stream-utils/pause/issues
- npm.io page: https://npm.io/package/pause

## Recent versions

- 0.1.0 (latest) — 2015-07-02
- 0.0.1 — 2012-07-19

## README

# pause

[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Node.js Version][node-image]][node-url]
[![Build Status][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]

Pause a stream's data events

## Installation

```sh
$ npm install pause
```

## API

```js
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](LICENSE)

[npm-image]: https://img.shields.io/npm/v/pause.svg
[npm-url]: https://npmjs.org/package/pause
[node-image]: https://img.shields.io/node/v/pause.svg
[node-url]: http://nodejs.org/download/
[travis-image]: https://img.shields.io/travis/stream-utils/pause/master.svg
[travis-url]: https://travis-ci.org/stream-utils/pause
[coveralls-image]: https://img.shields.io/coveralls/stream-utils/pause.svg
[coveralls-url]: https://coveralls.io/r/stream-utils/pause?branch=master
[downloads-image]: https://img.shields.io/npm/dm/pause.svg
[downloads-url]: https://npmjs.org/package/pause

---
_Source: https://npm.io/package/pause · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
