I'm currently exploring ways in which this package's size can be reduced. It seems like lodash is quite a big dependency (715kb uncompressed / not gzipped).
Digging in the source code, these are all the places where lodash is used:
map, forEach, values, filter, slice, keys, some, reduce and concat
are already implemented in the various versions of ES, which means that it's safe to use the native implementations. Should there be a requirement to support older browsers, babel should take care of the polyfills automatically.
Which leaves us with flatMap, get, minBy, maxBy, last, isEqual, difference, cloneDeep, size, range, mapValues, isFinite, intersection, first and defer.
Are you open to the possibility of having implemented these functions inside react-diagrams and drop the lodash package?
This will greatly reduce the size of the final bundle.
I'm currently exploring ways in which this package's size can be reduced. It seems like lodash is quite a big dependency (715kb uncompressed / not gzipped).
Digging in the source code, these are all the places where lodash is used:
A list of each method and the times it's being used:
The following methods:
map
,forEach
,values
,filter
,slice
,keys
,some
,reduce
andconcat
are already implemented in the various versions of ES, which means that it's safe to use the native implementations. Should there be a requirement to support older browsers, babel should take care of the polyfills automatically.
Which leaves us with
flatMap
,get
,minBy
,maxBy
,last
,isEqual
,difference
,cloneDeep
,size
,range
,mapValues
,isFinite
,intersection
,first
anddefer
.Are you open to the possibility of having implemented these functions inside react-diagrams and drop the lodash package? This will greatly reduce the size of the final bundle.