# debounce-stream

> Debounces a stream.

Latest version **2.0.0** (published 2015-02-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install debounce-stream
pnpm add debounce-stream
yarn add debounce-stream
bun add debounce-stream
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2015-02-20 |
| First published | 2014-11-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Nathan Wittstock |
| Maintainers | rangermauve, fardog |
| Keywords | stream, debounce |

## Links

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

## Dependencies (3)

- [through](https://npm.io/package/through.md) ^2.3.6
- [debounce](https://npm.io/package/debounce.md) ^1.0.0
- [duplexer](https://npm.io/package/duplexer.md) ^0.1.1

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2015-02-20
- 1.0.1 — 2014-12-12
- 1.0.0 — 2014-11-12

## README

# debounce-stream

Debounces a stream.

[![Build Status](http://img.shields.io/travis/fardog/debounce-stream/master.svg?style=flat)](https://travis-ci.org/fardog/debounce-stream)
[![npm install](http://img.shields.io/npm/dm/debounce-stream.svg?style=flat)](https://www.npmjs.org/package/debounce-stream)


## Example

```javascript
var events = require('dom-delegation-stream')
  , values = require('dom-value-object-stream')
  , debounce = require('debounce-stream')

events(document.querySelector('[rel=inputs]'), 'input')
  .pipe(values()) // values is a stream that progressively updates on user input
  .pipe(debounce(500)) // emit only after a pause of 500 ms
  .on('data', function(data) {
    console.log(data) // the data after a user has stopped typing for 500 ms
  })
```

## API

- `debounce([milliseconds] [, immediate])` - Create a new debounce duplex stream
    - `milliseconds` - Integer. The number of milliseconds to debounce the
      stream. Defaults to `100`
    - `immediate` - Boolean. If `true`, the debounced function will call
      immediately, rather than at the end of input. Default is `false`.

Returns a duplex stream that accepts values on one end, and emits the debounced
values on the other.

## Notes

This module which was previously known as `stream-debounce` is now known as
`debounce-stream`. Thanks to [RangerMauve][rangermauve] for allowing this
module to take over that name! The version was bumped to v2.0.0 for the name
change, and to ensure compatibility for users of the old version.

## License

MIT. See [LICENSE](./LICENSE) for details.

[rangermauve]: https://github.com/RangerMauve

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