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
Lodash 4 compatibility #585
Conversation
@bpatram Thanks for merging. Are you planning to make a new release from the After submitting my pull request, I noticed that you asked somebody else to also submit their pull request to the |
@jgonggrijp if you have the availability to submit a PR against Backbone-relational/backbone-relational.js Lines 79 to 84 in 4e2f5c0
I'll get a new release cut within the week |
If by "that other PR" you mean #574/#577, please don't cherrypick those changes. @drphelps actually replaced the Underscore methods by Lodash methods instead of aliasing them, which breaks compatibility with Underscore. I'm open to other approaches to my shim, but please let us preserve support for Underscore. |
Resolves #561. Summary of changes:
--lodash
option tokarma start
. Still runs with Underscore by default. (Tip for Yarn users: you can just doyarn test --lodash
)._.any
is used to determine whether the_
factory argument is Underscore or Lodash. In the latter case, some aliases are created on_
in order to keep the code changes to a minimum.context
argument was passed to functions like_.each
and_.map
,_.bind
is now used instead.npm
command line program.index.html
updated to reflect that Lodash works, too.Note on the
CONTRIBUTING.md
and the.editorconfig
: these files tell me that JavaScript files should be two-space indented, but the JavaScript files I edited were already tab-indented. I decided to go with the existing practice.