Created
April 7, 2018 01:25
-
-
Save nickbalestra/6ec2165ed9398d12d9426870f342e639 to your computer and use it in GitHub Desktop.
debounce Jest Workshop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const debounce = require('./debounce') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment