This package has been deprecated

Author message:

No longer maintained

function-tools

0.1.2 • Public • Published

view on npm npm module downloads per month Build Status Dependency Status js-standard-style

function-tools

Useful higher-order functions

Example

var f = require("function-tools")

f.throttle(f, [options]) ⇒ function

Guarantees a function a specified restPeriod in between invocations.

Kind: static method of function-tools

Param Type Description
f function the function to throttle
[options] Object the options
[options.restPeriod] number a value in ms

Example

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

© 2015 Lloyd Brookes 75pound@gmail.com

Readme

Keywords

Package Sidebar

Install

npm i function-tools

Weekly Downloads

0

Version

0.1.2

License

MIT

Last publish

Collaborators

  • 75lb