Skip to content

Instantly share code, notes, and snippets.

@nickbalestra
Created April 7, 2018 01:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickbalestra/6ec2165ed9398d12d9426870f342e639 to your computer and use it in GitHub Desktop.
Save nickbalestra/6ec2165ed9398d12d9426870f342e639 to your computer and use it in GitHub Desktop.
debounce Jest Workshop
/*
* Debounce a function
*
* Given a function and a delay in milliseconds create a way to debounce the given function so that,
* as long as it continues to be invoked, will not be triggered.
* The function will be called after it stops being called the given delay.
*
*/
const debounce = (fn, delay) => {
};
module.exports = debounce;
const debounce = require('./debounce')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment