DEV Community

[Comment from a deleted post]
Collapse
 
yvan33 profile image
Yvan GADEAU

I am using lodash#get that does exactly that.
By using lodash-es package, you can import only the get function so it's also very light.

Collapse
 
micheleriva profile image
Michele Riva

Yes, _.get does the same job, but as you can see on packagephobia.now.sh/, Lodash.get is 1.8kb (minified+gziped) vs Mjn 307bytes (minified+gziped).
When using Preact, Inferno, Hyper, having a lighter bundle does the difference!