# debounce-queue

> Like lodash.debounce but you get an array of all previous (unique) events

Latest version **0.4.0** (published 2021-12-26) · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2021-12-26 |
| First published | 2016-11-02 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Maintainers | laggingreflex |

## Links

- npm: https://www.npmjs.com/package/debounce-queue
- Repository: https://github.com/laggingreflex/debounce-queue
- Homepage: https://github.com/laggingreflex/debounce-queue#readme
- Issues: https://github.com/laggingreflex/debounce-queue/issues
- npm.io page: https://npm.io/package/debounce-queue

## Recent versions

- 0.4.0 (latest) — 2021-12-26
- 0.3.1 — 2019-04-09
- 0.3.0 — 2018-08-11
- 0.2.2 — 2017-09-27
- 0.2.1 — 2017-09-02
- 0.2.0 — 2017-01-30
- 0.1.0 — 2017-01-11
- 0.0.1 — 2016-11-05
- 0.0.0 — 2016-11-02

## README

# debounce-queue

[![npm](https://img.shields.io/npm/v/debounce-queue.svg)](https://www.npmjs.com/package/debounce-queue)

[Debounce] that gives you an array of **all** previous events instead of just the last one.

[debounce]: https://lodash.com/docs/4.16.6#debounce

## Install

```sh
npm install debounce-queue --save
```

## Usage

### Example

```js
import { watch } from 'fs'
import debounce from 'debounce-queue'

watch('.', debounce(list => {
  for(const [eventType, filename] of list) {
    ...
  }
}))
```

### API

```js
debounce(func, opts)
```

* **`func`** `<function>(required)` The function to debounce
* **`opts`** `[number|object]` Options or wait
* **`opts.wait`** `[number=0]` The number of milliseconds to delay
* **`opts.leading`** `[boolean=false]` Specify invoking on the leading edge of the timeout.
* **`opts.maxWait`** `[number]` The maximum time func is allowed to be delayed before it's invoked.
* **`opts.trailing`** `[boolean=true]` Specify invoking on the trailing edge of the timeout.

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