5 ms·
Can you point me to an explanation of the differences between the 'lodash.throttle' module and importing 'lodash/throttle'?
by Heqx 10y ago
Can you point me to an explanation of the differences between the 'lodash.throttle' module and importing 'lodash/throttle'?
- freditup 10y agoYou should get about the same results using a bundler. Perhaps the lodash.throttle package is for reducing `npm install` time or reducing bloat if you check in your node modules?
- jdd 10y agolodash.throttle is a standalone zero-dependency package of just the throttle module. The `lodash` package is a collection of modules one of which is `lodash/throttle`. You can generally get smaller bundles using `lodash/xyz` modules over the `lodash.xyz` packages because of plugins like: https://github.com/lodash/babel-plugin-lodash https://github.com/lodash/babel-plugin-lodash https://github.com/lodash/lodash-webpack-plugin https://github.com/lodash/lodash-webpack-plugin Though in the future lodash-webpack-plugin may support `lodash.xyz` packages too.