# @seedalpha/throttle

> throttle/debounce events

Latest version **1.0.10** (published 2020-01-18) · ©2016 SeedAlpha license · 0 weekly downloads

## Install

```sh
npm install @seedalpha/throttle
pnpm add @seedalpha/throttle
yarn add @seedalpha/throttle
bun add @seedalpha/throttle
```

## 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 | 1.0.10 |
| Published | 2020-01-18 |
| First published | 2020-01-14 |
| Weekly downloads | 0 |
| License | ©2016 SeedAlpha |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Vladimir Popov |
| Maintainers | ac_inc |
| Keywords | queue, throttle, debounce |

## Links

- npm: https://www.npmjs.com/package/@seedalpha/throttle
- Repository: https://github.com/seedalpha/throttle
- Homepage: https://github.com/seedalpha/throttle#readme
- Issues: https://github.com/seedalpha/throttle/issues
- npm.io page: https://npm.io/package/@seedalpha/throttle

## Alternatives

- [cron](https://npm.io/package/cron.md) — 4.9M weekly downloads
- [@vercel/queue](https://npm.io/package/@vercel/queue.md) — 731.6K weekly downloads
- [create-sonicjs](https://npm.io/package/create-sonicjs.md) — 1.6K weekly downloads
- [@exellix/jobs-api](https://npm.io/package/@exellix/jobs-api.md) — 941 weekly downloads
- [@forwardimpact/libskill](https://npm.io/package/@forwardimpact/libskill.md) — 575 weekly downloads

## Recent versions

- 1.0.10 (latest) — 2020-01-18
- 1.0.0 — 2020-01-14

## README

# throttle

queue/debounce events

### Installation

    $ npm install seed-throttle --save
    
### Usage

```javascript

var throttle = require('seed-throttle');

function fn(items, cb) {
  // array of items in the queue
  // cb when done
}

var queue = throttle({
  timeout: 20000, // flush every 20 seconds (if queue is not empty)
  size: 20 // flush if queue is at least 20 events long
}, fn);

queue.push(item);
queue.push(item2, item3, item4)
queue.push([item5, item6, item7]);
queue.flush(function() {
  // force flush and get a callback when all done
});
```

### Author

Vladimir Popov <vlad@seedalpha.net>

### License

©2016 SeedAlpha

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