npm.io
0.1.3 • Published 7 years ago

@banterstudiosuk/throttle

Licence
MIT
Version
0.1.3
Deps
0
Size
3 kB
Vulns
0
Weekly
0
Stars
2

@banterstudiosuk/throttle

Throttle function

Install

npm

npm i --save @banterstudiosuk/throttle

Usage

import throttle from '@banterstudiosuk/throttle'

const handleScroll = () => console.log('scrolling')

const throttledFn = throttle(handleScroll, 100)

window.addEventListener('scroll', throttledFn, false)

License

MIT