Skip to content
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

don't include all of lodash #2

Closed
VinSpee opened this issue Jul 18, 2018 · 1 comment · Fixed by #3
Closed

don't include all of lodash #2

VinSpee opened this issue Jul 18, 2018 · 1 comment · Fixed by #3

Comments

@VinSpee
Copy link
Contributor

VinSpee commented Jul 18, 2018

Hi!

import _ from 'lodash' is inflating the size of this package unnecessarily (26kb!). The library only uses _.camelCase and _.isArray.

_.isArray isn't necessary, as Array.isArray() is faster and has vast browser support.

_.camelCase can be replaced with lodash.camelcase, which is 2kb.

Before:
image

After:
image

Tests pass.

VinSpee pushed a commit to VinSpee/redux-camel that referenced this issue Jul 18, 2018
use `lodash.camelcase` and `Array.isArray` instead of _all_ of lodash

hibiken#2
@VinSpee
Copy link
Contributor Author

VinSpee commented Jul 18, 2018

Thanks for the quick merge and the useful utility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant