# function-tools

> Useful higher-order functions

Latest version **0.1.2** (published 2015-11-05) · MIT license · 0 weekly downloads

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

## Install

```sh
npm install function-tools
pnpm add function-tools
yarn add function-tools
bun add function-tools
```

## Health

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

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2015-11-05 |
| First published | 2014-06-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Lloyd Brookes |
| Maintainers | 75lb |
| Keywords | throttle, function |

## Links

- npm: https://www.npmjs.com/package/function-tools
- Repository: https://github.com/75lb/function-tools
- Homepage: https://github.com/75lb/function-tools#readme
- Issues: https://github.com/75lb/function-tools/issues
- npm.io page: https://npm.io/package/function-tools

## Recent versions

- 0.1.2 (latest) — 2015-11-05
- 0.1.1 — 2014-08-09
- 0.1.0 — 2014-06-14
- 0.0.1 — 2014-06-14

## README

[![view on npm](http://img.shields.io/npm/v/function-tools.svg)](https://www.npmjs.org/package/function-tools)
[![npm module downloads per month](http://img.shields.io/npm/dm/function-tools.svg)](https://www.npmjs.org/package/function-tools)
[![Build Status](https://travis-ci.org/75lb/function-tools.svg?branch=master)](https://travis-ci.org/75lb/function-tools)
[![Dependency Status](https://david-dm.org/75lb/function-tools.svg)](https://david-dm.org/75lb/function-tools)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard)

<a name="module_function-tools"></a>
## function-tools
Useful higher-order functions

**Example**  
```js
var f = require("function-tools")
```
<a name="module_function-tools.throttle"></a>
### f.throttle(f, [options]) ⇒ <code>function</code>
Guarantees a function a specified `restPeriod` in between invocations.

**Kind**: static method of <code>[function-tools](#module_function-tools)</code>  

| Param | Type | Description |
| --- | --- | --- |
| f | <code>function</code> | the function to throttle |
| [options] | <code>Object</code> | the options |
| [options.restPeriod] | <code>number</code> | a value in ms |

**Example**  
```js
var throttled = f.throttle(myFunction, { restPeriod: 200 })
throtted() // this will only execute if at least 200ms since the last invocation
```

* * *

&copy; 2015 Lloyd Brookes <75pound@gmail.com>

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