1.0.0 • Published 10 years ago

bloody-debounce-af v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

debounce af

install

$ npm install bloody-debounce-af

require

var daf = require("bloody-debounce-af")

api

daf(fn) > debounced

creates a function which, when called, waits until there is no call until an animation frame is triggered. then executes fn with its the last arguments that has been passed to debounced.

example

var render = daf(function(text){
  div.textContent = text
})

input.addEventListener("input", function(eventObject){
  render(eventObject.currentTarget.value)
})
1.0.0

10 years ago