Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Commit

Permalink
use selective import on lodash
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatiusreza committed Nov 27, 2017
1 parent ddbfb3f commit 7f4bdf4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/report.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<body>
<div id="app"></div>
<script>
window.chartData = [{"label":"bundle.js","statSize":540912,"parsedSize":72511,"gzipSize":25438,"groups":[{"id":0,"label":"index.js","path":"./index.js","statSize":341,"parsedSize":194,"gzipSize":152},{"label":"node_modules","path":"./node_modules","statSize":539588,"parsedSize":71391,"gzipSize":25010,"groups":[{"label":"lodash","path":"./node_modules/lodash","statSize":539588,"parsedSize":71391,"gzipSize":25010,"groups":[{"id":1,"label":"lodash.js","path":"./node_modules/lodash/lodash.js","statSize":539588,"parsedSize":71391,"gzipSize":25010}]}]},{"label":"buildin","path":"./buildin","statSize":983,"parsedSize":459,"gzipSize":256,"groups":[{"id":2,"label":"global.js","path":"./buildin/global.js","statSize":488,"parsedSize":158,"gzipSize":136},{"id":3,"label":"module.js","path":"./buildin/module.js","statSize":495,"parsedSize":301,"gzipSize":181}]}]}];
window.chartData = [{"label":"bundle.js","statSize":25996,"parsedSize":6991,"gzipSize":2246,"groups":[{"label":"node_modules","path":"./node_modules","statSize":24665,"parsedSize":5841,"gzipSize":1845,"groups":[{"label":"lodash","path":"./node_modules/lodash","statSize":24665,"parsedSize":5841,"gzipSize":1845,"groups":[{"id":0,"label":"_root.js","path":"./node_modules/lodash/_root.js","statSize":300,"parsedSize":131,"gzipSize":125},{"id":1,"label":"_getNative.js","path":"./node_modules/lodash/_getNative.js","statSize":483,"parsedSize":98,"gzipSize":103},{"id":2,"label":"_baseGetTag.js","path":"./node_modules/lodash/_baseGetTag.js","statSize":792,"parsedSize":193,"gzipSize":172},{"id":3,"label":"isObjectLike.js","path":"./node_modules/lodash/isObjectLike.js","statSize":614,"parsedSize":75,"gzipSize":87},{"id":4,"label":"_isPrototype.js","path":"./node_modules/lodash/_isPrototype.js","statSize":480,"parsedSize":136,"gzipSize":123},{"id":5,"label":"isFunction.js","path":"./node_modules/lodash/isFunction.js","statSize":993,"parsedSize":218,"gzipSize":160},{"id":6,"label":"_Symbol.js","path":"./node_modules/lodash/_Symbol.js","statSize":118,"parsedSize":50,"gzipSize":70},{"id":7,"label":"_freeGlobal.js","path":"./node_modules/lodash/_freeGlobal.js","statSize":173,"parsedSize":107,"gzipSize":109},{"id":8,"label":"isObject.js","path":"./node_modules/lodash/isObject.js","statSize":733,"parsedSize":100,"gzipSize":103},{"id":9,"label":"_toSource.js","path":"./node_modules/lodash/_toSource.js","statSize":556,"parsedSize":157,"gzipSize":132},{"id":10,"label":"isLength.js","path":"./node_modules/lodash/isLength.js","statSize":802,"parsedSize":108,"gzipSize":117},{"id":13,"label":"isEmpty.js","path":"./node_modules/lodash/isEmpty.js","statSize":2000,"parsedSize":414,"gzipSize":273},{"id":14,"label":"_baseKeys.js","path":"./node_modules/lodash/_baseKeys.js","statSize":776,"parsedSize":202,"gzipSize":172},{"id":15,"label":"_nativeKeys.js","path":"./node_modules/lodash/_nativeKeys.js","statSize":204,"parsedSize":64,"gzipSize":79},{"id":16,"label":"_overArg.js","path":"./node_modules/lodash/_overArg.js","statSize":382,"parsedSize":77,"gzipSize":72},{"id":17,"label":"_getTag.js","path":"./node_modules/lodash/_getTag.js","statSize":1838,"parsedSize":572,"gzipSize":315},{"id":18,"label":"_DataView.js","path":"./node_modules/lodash/_DataView.js","statSize":210,"parsedSize":64,"gzipSize":82},{"id":19,"label":"_baseIsNative.js","path":"./node_modules/lodash/_baseIsNative.js","statSize":1417,"parsedSize":367,"gzipSize":282},{"id":21,"label":"_getRawTag.js","path":"./node_modules/lodash/_getRawTag.js","statSize":1139,"parsedSize":240,"gzipSize":191},{"id":22,"label":"_objectToString.js","path":"./node_modules/lodash/_objectToString.js","statSize":565,"parsedSize":93,"gzipSize":102},{"id":23,"label":"_isMasked.js","path":"./node_modules/lodash/_isMasked.js","statSize":564,"parsedSize":171,"gzipSize":162},{"id":24,"label":"_coreJsData.js","path":"./node_modules/lodash/_coreJsData.js","statSize":157,"parsedSize":65,"gzipSize":85},{"id":25,"label":"_getValue.js","path":"./node_modules/lodash/_getValue.js","statSize":325,"parsedSize":69,"gzipSize":77},{"id":26,"label":"_Map.js","path":"./node_modules/lodash/_Map.js","statSize":195,"parsedSize":59,"gzipSize":77},{"id":27,"label":"_Promise.js","path":"./node_modules/lodash/_Promise.js","statSize":207,"parsedSize":63,"gzipSize":81},{"id":28,"label":"_Set.js","path":"./node_modules/lodash/_Set.js","statSize":195,"parsedSize":59,"gzipSize":77},{"id":29,"label":"_WeakMap.js","path":"./node_modules/lodash/_WeakMap.js","statSize":207,"parsedSize":63,"gzipSize":81},{"id":30,"label":"isArguments.js","path":"./node_modules/lodash/isArguments.js","statSize":1026,"parsedSize":214,"gzipSize":170},{"id":31,"label":"_baseIsArguments.js","path":"./node_modules/lodash/_baseIsArguments.js","statSize":488,"parsedSize":104,"gzipSize":111},{"id":32,"label":"isArray.js","path":"./node_modules/lodash/isArray.js","statSize":488,"parsedSize":46,"gzipSize":62},{"id":33,"label":"isArrayLike.js","path":"./node_modules/lodash/isArrayLike.js","statSize":830,"parsedSize":96,"gzipSize":107},{"id":34,"label":"isBuffer.js","path":"./node_modules/lodash/isBuffer.js","statSize":1114,"parsedSize":230,"gzipSize":175},{"id":35,"label":"stubFalse.js","path":"./node_modules/lodash/stubFalse.js","statSize":280,"parsedSize":48,"gzipSize":62},{"id":36,"label":"isTypedArray.js","path":"./node_modules/lodash/isTypedArray.js","statSize":695,"parsedSize":87,"gzipSize":102},{"id":37,"label":"_baseIsTypedArray.js","path":"./node_modules/lodash/_baseIsTypedArray.js","statSize":2222,"parsedSize":671,"gzipSize":271},{"id":38,"label":"_baseUnary.js","path":"./node_modules/lodash/_baseUnary.js","statSize":332,"parsedSize":72,"gzipSize":71},{"id":39,"label":"_nodeUtil.js","path":"./node_modules/lodash/_nodeUtil.js","statSize":765,"parsedSize":258,"gzipSize":189}]}]},{"label":"buildin","path":"./buildin","statSize":983,"parsedSize":459,"gzipSize":256,"groups":[{"id":11,"label":"module.js","path":"./buildin/module.js","statSize":495,"parsedSize":301,"gzipSize":181},{"id":20,"label":"global.js","path":"./buildin/global.js","statSize":488,"parsedSize":158,"gzipSize":136}]},{"id":12,"label":"index.js","path":"./index.js","statSize":348,"parsedSize":187,"gzipSize":150}]}];
window.defaultSizes = "parsed";
</script>
</body>
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import _ from 'lodash';
import isEmpty from 'lodash/isEmpty';

const question = 'question';

if (_.isEmpty(question) || !_.isEmpty(question)) console.log(`that is the ${question}`);
if (isEmpty(question) || !isEmpty(question)) console.log(`that is the ${question}`);

0 comments on commit 7f4bdf4

Please sign in to comment.