-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change lodash imports #15
base: master
Are you sure you want to change the base?
Conversation
@@ -5,6 +5,7 @@ | |||
"main": "index.js", | |||
"scripts": { | |||
"test": "mocha", | |||
"test-watch": "mocha --watch", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this script in here as well to make it easier to make fixes and test at the same time.
I've updated the lockfile, and the version of node in circle in order to get CI to pass. There were issues with deprecated packages, and the version of Node we were using, |
forgive the ignorance if this isn't possible but is there a way to leverage https://github.com/lodash/babel-plugin-lodash here in this case? I've had good experience with it in the past. |
This PR is very useful and safe, I wonder why it wasn't merged? |
lodash got removed in #55. |
Hi there,
We've started using your package (which is great, by the way, thank you!) recently, and I noticed that it started bloating the JS file that it gets included into. Digging into it a bit further, I saw that this package was importing lodash components as
import {foo, bar} from 'lodash'
, which imports the entire lodash package. I've changed the imports to bewhich imports only the specific modules required. Doing this should reduce the file size footprint of this package :).
utils.js
file. In this particular instance I replaced thelodash.keys
method withObject.keys
andlodash.map
with theArray.map
function. There are a few other instances this could be done, such as in the usage offilter
,reduce
, and a few other methods, but I thought I'd get this merged in first and return to these later.Thanks, and let me know if I missed anything or you have any questions!