Skip to content

Instantly share code, notes, and snippets.

@ben-rogerson
Created March 25, 2018 06:39
Show Gist options
  • Save ben-rogerson/51d28640eabb40881aadb1772067efd9 to your computer and use it in GitHub Desktop.
Save ben-rogerson/51d28640eabb40881aadb1772067efd9 to your computer and use it in GitHub Desktop.
Cheap Ass Debouncing
let counter = 0
const isTimeToUpdate = (updateRate = 10) => counter++ % updateRate === 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment