# @ngard/tiny-throttle

> A minimal-weight utility similar to lodash.throttle

Latest version **1.1.0** (published 2019-01-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ngard/tiny-throttle
pnpm add @ngard/tiny-throttle
yarn add @ngard/tiny-throttle
bun add @ngard/tiny-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.1.0 |
| Published | 2019-01-01 |
| First published | 2018-12-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 14.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Nick Gard |
| Maintainers | ngard |
| Keywords | lodash, throttle, util |

## Links

- npm: https://www.npmjs.com/package/@ngard/tiny-throttle
- Repository: https://github.com/NickGard/tiny-throttle
- Homepage: https://github.com/NickGard/tiny-throttle#readme
- Issues: https://github.com/NickGard/tiny-throttle/issues
- npm.io page: https://npm.io/package/@ngard/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

- 1.1.0 (latest) — 2019-01-01
- 1.0.0 — 2018-12-12

## README

# tiny-throttle

[![source](https://badgen.net/npm/v/@ngard/tiny-throttle)](https://www.npmjs.com/package/@ngard/tiny-throttle)
[![bundle size](https://badgen.net/bundlephobia/minzip/@ngard/tiny-throttle)](https://bundlephobia.com/result?p=@ngard/tiny-throttle)
[![build status](https://badgen.net/travis/NickGard/tiny-throttle)](https://travis-ci.org/NickGard/tiny-throttle)
[![license](https://badgen.net/badge/license/MIT/blue)](https://badgen.net/badge/license/MIT/blue)

A minimal utility similar to `lodash.throttle`. For when every byte counts!

<hr/>

lodash.throttle: [![bundle size](https://badgen.net/bundlephobia/minzip/lodash.throttle)](https://bundlephobia.com/result?p=lodash.throttle)
<br/>
tiny-throttle: [![bundle size](https://badgen.net/bundlephobia/minzip/@ngard/tiny-throttle)](https://bundlephobia.com/result?p=@ngard/tiny-throttle)

<hr/>

## Install

```sh
npm install @ngard/tiny-throttle
```

## Syntax

```javascript
throttle(/* function, interval */);
```

## Parameters

`function` - The function to be throttled.
`interval` - The amount of time, in milliseconds, to wait between invocations of the function. All function calls made during this interval are ignored.

## Returns
A throttled function.

## Example

```javascript
import { throttle } from '@ngard/tiny-throttle';

window.addListener('scroll', throttle(animateSomething, 16));
```

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