-
Notifications
You must be signed in to change notification settings - Fork 0
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
[CLOSED] Add lo-dash #4812
Comments
Comment by gruehle Dang, I wrote backbone in the original bug report, but really meant underscore 😊. Title and description updated. |
Comment by gruehle
|
Comment by iwehrman
|
Comment by dangoor We spoke about this issue today and collectively decided that the extra features in Lo-Dash make it worthwhile to add to Brackets. Specifically, we would take the full "modern browser" version of Lo-Dash. Also of note: we are going to separately consider the issue of using Lo-Dash for templating rather than Mustache. For now, we're just going to use the non-templating features of Lo-Dash. |
Comment by njx Removing "needs review". Assigning to me/medium priority for now as I'm interested in doing this, but if someone else would like to grab it feel free. |
Comment by iwehrman Do we want to load this as an AMD module or as a global? (My vote is for an AMD module, since we'll probably have to clean up our use of globals eventually anyway.) |
Comment by njx That seems fine to me. I assume that means we have to do |
Comment by iwehrman If we want we can use the module name, or name it ourselves, so that we just have to do |
Comment by njx 👍 |
Comment by iwehrman I don't know if I'll have time to finish this before I leave for PTO tomorrow, but here's a branch that adds Lo-Dash as a module named "lodash" and takes care of a single VanillaJS-to-Lo-Dash conversion. I generated the lodash file using lodash-cli as follows:
This generates a minified AMD module that assumes modern browsers. |
Comment by njx One thought: we might want to deprecate the utility functions we no longer need rather than removing them right away, in case other folks are using them. (I would guess no one is using this NumberUtils one, but if we started using |
Comment by dangoor I think we should deprecate our existing functions. Hopefully people will test with the essentially equivalent lodash function. |
Comment by njx
|
Comment by iwehrman Sure. By "deprecate" do you mean redefine, e.g., Also: do you have a problem with removing Reassigning to |
Comment by njx If nobody is using NumberUtils, then yeah, we can probably just remove it (and release-note it). In general, though, I think it would be fine to make existing functions just call the lodash version (and warn) as long as the semantics are the same. |
Issue by gruehle
Monday Sep 16, 2013 at 20:24 GMT
Originally opened as adobe/brackets#5229
We should add Lo-dash to the Brackets core code. There are many places where we've re-implemented underscore-style functionality or could improve our code by using Lo-dash.
If you find a piece of code that could be better expressed using Lo-dash, please add it as a comment to this issue.
The text was updated successfully, but these errors were encountered: