Closed SukkaW closed 10 months ago
For throttle and debounce, I'm using https://www.npmjs.com/package/@github/mini-throttle personally. It is small, efficient and maintained.
For throttle and debounce, I'm using https://www.npmjs.com/package/@github/mini-throttle personally. It is small, efficient and maintained.
I was thinking about using perfect-debounce
from the unjs community (https://www.npmjs.com/package/perfect-debounce). However, webpack-bundle-analyzer still targets Node.js 10.13.0+ and I was afraid of breaking it. So I chose the debounce
package instead. Once the Node.js 10 support has been dropped, we can switch to a more modern package.
Do you also want to replace the packages used as dev dependencies ?
Do you also want to replace the packages used as dev dependencies ?
Hmm, I don't know about that. If we do decide to go that route, let's at least split that work to its own PR to make this diff smaller.
Released in v4.10.0! ☺️
The PR replaces all
lodash.*
packages.lodash.escape
->html-escaper
lodash.flatten
-> a modified version ofarr-flatten
lodash.debounce
->debounce
lodash.pullall
-> Array.prototype.filterlodash.uniqby
-> Set + Array.prototype.filterlodash.invokemap
-> Object.valuesComparison
Running
npm i --omit=dev --omit=optional
againstwebpack-contrib/webpack-bundle-analyzer:master
:Running
npm i --omit=dev --omit=optional
againstsukkaw/webpack-bundle-analyzer:repalce-lodash-usage
:The installation size becomes even smaller!