Tiny debounce function
Built with ❤︎ by tiaanduplessis and contributors
$ npm install picobounce
# OR
$ yarn add picobounce
const picobounce = require('picobounce')
const log = () => console.log('foooo!')
const debounce = picobounce(500)
const debounceImmediate = picobounce({wait: 300, immediate: true})
debounce(log)
debounce(log)
debounce(log) // foooo!
debounceImmediate(log) // foooo!
debounceImmediate(log)
debounceImmediate(log)
Contributions are welcome!
- Fork it.
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Or open up a issue.
Licensed under the MIT License.