# async-call-limiter

> Debounces and throttle calls to async functions allowing return values

Latest version **1.3.1** (published 2020-02-12) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install async-call-limiter
pnpm add async-call-limiter
yarn add async-call-limiter
bun add async-call-limiter
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.3.1 |
| Published | 2020-02-12 |
| First published | 2019-11-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10.0.0 |
| Dependencies | 1 |
| Unpacked size | 60.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | spudnyk |
| Keywords | debounce, async, throttle, promise, async-functions, typescript |

## Links

- npm: https://www.npmjs.com/package/async-call-limiter
- Repository: https://github.com/SpudNyk/async-call-limiter
- Homepage: https://spudnyk.github.io/async-call-limiter
- npm.io page: https://npm.io/package/async-call-limiter

## Dependencies (1)

- [docs](https://npm.io/package/docs.md) ^0.3.2-canary.0

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 1.3.1 (latest) — 2020-02-12
- 1.3.0 — 2020-02-12
- 1.2.1 — 2020-01-22
- 1.1.0 — 2019-12-02
- 1.0.1 — 2019-11-27
- 1.0.0 — 2019-11-26

## README

# async-call-limiter

A set of functions useful in an async/await environment.

## Description

These functions are similar to others debounce and throttle functions. e.g. [Lodash's](https://lodash.com): [debounce](https://lodash.com/docs/4.17.15#debounce) and [throttle](https://lodash.com/docs/4.17.15#throttle).
However these functions differ in that the resulting function when called returns a promise that will resolve/reject when the wrapped function is invoked. The functions also can take an "argument reducer" function that determines the arguments that will be given to wrapped function.
The default reducer implementation just uses the last arguments given, however you can use this to merge arguments so the wrapped function can handle all calls. This could be useful wrapping a request for specific items to merge multiple calls into one request.

## Documentation

- [API](https://spudnyk.github.io/async-call-limiter/api/)

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