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

Replace lodash with ES6 methods and functions #693

Closed
stalniy opened this issue Jun 17, 2017 · 4 comments
Closed

Replace lodash with ES6 methods and functions #693

stalniy opened this issue Jun 17, 2017 · 4 comments

Comments

@stalniy
Copy link
Contributor

stalniy commented Jun 17, 2017

This will allow to use native methods in modern browsers and use polyfills for old one. The main benefit is reduced bundle size and -1 dependency.

Update: I can provide a PR if you agree to proceed with this

@radiolips
Copy link
Member

I'm so torn. When I updated jquery-ui I got some pushback and I'm still getting pushback from jQuery. ES6 is becoming more ubiquitous of course.

@stalniy I don't want to waste your time, but could you put together a PR? Last time I check for lodash functions, it looked like we were using around 75 of them, and it seemed burdensome to remove. I was initially planning on removing them in favor of Javascript functionality from earlier than ES6.

@stalniy
Copy link
Contributor Author

stalniy commented Jul 6, 2017

@radiolips done

@krilllind
Copy link

Doing a quick search inside of the src/gridstack.js gives me abouth 50 hits on lodash.
Functions that are used:

  • chain
  • sortBy
  • isString
  • find
  • bind
  • each
  • defaults
  • filter
  • clone
  • without
  • map
  • reduce
  • first
  • throttle

Have anyone heard anything new about this? I feel like importing the entire lodash lib for these functions, gives a lot of overhead. Would be grate to get rid of it!

The good thing is that a lot of these functions can be changed into native es6 methods.

@adumesny
Copy link
Member

adumesny commented Jan 5, 2018

I'm looking at taking this pull request locally as I too need to remove the large dependency on lodash... it's one the biggest lib we are importing now that should be removed. Would be nice to have that taken.

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

No branches or pull requests

4 participants