-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Add lo-dash #5229
Comments
Dang, I wrote backbone in the original bug report, but really meant underscore 😊. Title and description updated. |
|
|
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. |
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. |
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.) |
That seems fine to me. I assume that means we have to do |
If we want we can use the module name, or name it ourselves, so that we just have to do |
👍 |
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. |
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 |
I think we should deprecate our existing functions. Hopefully people will test with the essentially equivalent lodash function. |
@iwehrman - any interest in updating your branch to deprecate the old function (rather than removing it for now) and making a pull request? |
Sure. By "deprecate" do you mean redefine, e.g., Also: do you have a problem with removing Reassigning to @iwehrman. |
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. |
Fixed by #5539. |
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: