In reply to Jeremy's tweet, that underscore is 3x smaller (simpler?) than Lodash! https://twitter.com/jashkenas/status/568564455937839106
Apparently, it's only true if you use <script>
tag,
but if you use lodash's module feature and build your project with browserify(or webpack) you get different numbers.
In simple cases underscore can be 4-6 times bigger.
15020 bundle-lodash-without.js
4820 bundle-lodash-without.min.js
1647 bundle-lodash-without.min.js.gz
13032 bundle-lodash.js
6103 bundle-lodash.min.js
1854 bundle-lodash.min.js.gz
51951 bundle-underscore.js
25045 bundle-underscore.min.js
7093 bundle-underscore.min.js.gz
Build commands:
browserify lodash.js -o bundle.lodash.js
uglifyjs bundle.lodash.js -o bundle.lodash.min.js
gzip -c -- bundle-lodash.min.js > bundle-lodash.min.js.gz
Thanks @jdalton for useful pro tips!