simpler-debounce
Creates and returns a new debounced version of the passed function that will postpone its execution until after wait milliseconds have elapsed since the last time it was invoked
Last updated 5 years ago by rstacruz .
MIT · Original npm · Tarball · package.json
$ cnpm install simpler-debounce 
SYNC missed versions from official npm registry.

simpler-debounce

An implementation of debounce with significantly less code.

var debounce = require('debounce')
window.onresize = debounce(resize, 200)
 
function resize (e) {
  console.log('height', window.innerHeight)
  console.log('width', window.innerWidth)
}

debounce

debounce(fn, wait)

Creates and returns a new debounced version of the passed function that will postpone its execution until after wait milliseconds have elapsed since the last time it was invoked.

Current Tags

  • 1.0.0                                ...           latest (5 years ago)

1 Versions

  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (1)

Copyright 2014 - 2017 © taobao.org |