|
|
|
|
|
by nathancahill
3576 days ago
|
|
Not sure why I was downvoted, I think it's a valid point. To prove it, here's the functionality of your library in ES5 with a naive throttle function: https://gist.github.com/nathancahill/f7ea239306737f2075a94de... Minified (1.49kb) and gzipped (677b). Whether lodash functions should be used instead of naive functions is up for debate. My opinion is if the lodash functions are 5x the size of the entire library, it's probably best to not include it, or to include it as a build option (if the user's project already includes lodash for example). |
|
Assuming the current setup of babel+webpack the difference between your naive version is just ~0.5 kB.