# @f/raf-debounce

> Debounced raf function

Latest version **1.0.1** (published 2016-11-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @f/raf-debounce
pnpm add @f/raf-debounce
yarn add @f/raf-debounce
bun add @f/raf-debounce
```

## 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.1 |
| Published | 2016-11-10 |
| First published | 2016-11-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Maintainers | f |

## Links

- npm: https://www.npmjs.com/package/@f/raf-debounce
- Repository: https://github.com/micro-js/raf-debounce
- Homepage: https://github.com/micro-js/raf-debounce#readme
- Issues: https://github.com/micro-js/raf-debounce/issues
- npm.io page: https://npm.io/package/@f/raf-debounce

## Dependencies (1)

- [@f/raf](https://npm.io/package/@f/raf.md) ^1.0.3

## Recent versions

- 1.0.1 (latest) — 2016-11-10
- 1.0.0 — 2016-11-10

## README

# raf-debounce

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Debounced raf (requestAnimationFrame) function

## Installation

    $ npm install @f/raf-debounce

## Usage

```js
var rafDebounce = require('@f/raf-debounce')
var debouncedRender = rafDebounce(render)

subscribe(debouncedRender)
```

## API

### rafDebounce(fn)

- `fn` - The function you want to call no more than once every animation frame.

**Returns:** A debounced version of `fn` that runs only once every animation frame (at most). When called, that function returns a cancel function that can be used to cancel a pending debounce.

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/raf-debounce.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/raf-debounce
[git-image]: https://img.shields.io/github/tag/micro-js/raf-debounce.svg?style=flat-square
[git-url]: https://github.com/micro-js/raf-debounce
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@f/raf-debounce.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@f/raf-debounce

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