Skip to content

micro-js/throttle-intervaled

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

throttle-intervaled

Build status Git tag NPM version Code style

A throttle that only fires on an interval.

Installation

$ npm install @f/throttle-intervaled

Usage

var throttle = require('@f/throttle-intervaled')

var hello = throttle(500, function () {
  console.log('Hello world')
})

// will log "hello world" once, 500 ms from first call
hello()
hello()

API

throttleIntervaled(interval, fn)

  • interval - interval
  • fn - function to throttle

Returns: throttled fn

License

MIT

About

A throttle that only fires on an interval.

Resources

Stars

Watchers

Forks

Packages

No packages published