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

Using with lodash #155

Open
tomoscase opened this issue Aug 17, 2013 · 2 comments
Open

Using with lodash #155

tomoscase opened this issue Aug 17, 2013 · 2 comments

Comments

@tomoscase
Copy link

First of all, thanks for the great plug in.

I would like to use it with lodash instead of underscore. If I rewrite one part of the ModelBinder script from underscore to lodash, my app works perfectly.

It will be great if you can make it work with both underscore and lodash as Backbone.js does.

Please let me know if you are not planning to add this feature.

@theironcook
Copy link
Owner

I like lodash and would be happy to have the model binder work with either Underscore or Lodash as a configuration option. I know they are supposed to be interchangeable but I was bitten by several inconsistencies a few months ago. If you want to post the changes you had to made as a gist etc. let me know and I'll try to incorporate it in the main line.

@tomoscase
Copy link
Author

So far, I just changed the line below, and it is working.
From
define(['underscore', 'jquery', 'backbone'], factory);
To
define(['lodash', 'jquery', 'backbone'], factory);

It tries to load underscore.js if my App has not loaded underscore whereas lodash is loaded.

I didn't know they had several inconsistencies, but I'll report if I got any problems.

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

2 participants