# tiny-throttle

> 🚗 A tiny throttle & debounce package

Latest version **2.0.0** (published 2026-08-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install tiny-throttle
pnpm add tiny-throttle
yarn add tiny-throttle
bun add tiny-throttle
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2026-08-07 |
| First published | 2018-02-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 9.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 6 |
| Author | Ben Williams |
| Maintainers | biwills |
| Keywords | throttle, debounce, lodash |

## Links

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

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2026-08-07
- 1.0.4 — 2023-01-10
- 1.0.3 — 2021-06-04
- 1.0.2 — 2021-05-31
- 1.0.1 — 2018-02-14
- 1.0.0 — 2018-02-14

## README

# tiny-throttle 🚗

[![Build Status](https://badgen.net/github/checks/biw/tiny-throttle/main)](https://github.com/biw/tiny-throttle/actions/workflows/ci.yml)
[![version](https://badgen.net/npm/v/tiny-throttle)](https://www.npmjs.com/package/tiny-throttle)
[![npm downloads](https://badgen.net/npm/dt/tiny-throttle)](https://www.npmjs.com/package/tiny-throttle)

A tiny throttle & debounce package.

## Install

```bash
pnpm add tiny-throttle
```

or

```bash
npm install tiny-throttle
```

or

```html
<script src="https://unpkg.com/tiny-throttle/dist/tiny-throttle.umd.js"></script>
```

Then you can find the library on `window.tinyThrottle`

## Usage

```js
import { debounce, throttle } from 'tiny-throttle'

// on click, run a function
// then wait 500 milliseconds from last click to run again on next click
document.getElementById('button').onclick = debounce(
  doSomethingWithNetwork,
  500,
  true,
)

// on click, wait 500 milliseconds after last click then run a function
document.getElementById('button').onclick = debounce(
  doSomethingToTeachUsersToWait,
  500,
)

// on click, run a function, then make sure it doesn't get run more than once
// every 500 milliseconds
document.getElementById('button').onclick = throttle(
  doSomethingWithNetwork,
  500,
)
```

## License

MIT © [Ben Williams](https://biwills.com)

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