I'm completely new to lodash, but I'm trying to implement debounce as per this article. I can get it using v3.5 via this CDN but every time I try to download 4.11.1 and include it in my project I get an Uncaught Type Error: _.debounce is not a function.
Here's my script, pretty straightforward:
jQuery(window).on("resize", _.debounce(function() {
console.log("hello world");
}, 400));
Any ideas why this wouldn't be working with the newer version of lodash? I referenced the documentation and I'm not seeing anything out of place here. Very odd.
Okay, I feel dumb about this. I completely missed that there where two separate builds, "core" and "full." Apparently core doesn't come bundled with debounce. I've got it working now with the full script.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With