jeremyruppel/underscore.inflection

Support lodash

Opened this issue · 6 comments

Any interest in supporting lodash?

Certainly! Thanks for reaching out, what do you have in mind?

Sent from my iPhone

On Jan 22, 2015, at 1:20 PM, Anthony Smith notifications@github.com wrote:

Any interest in supporting lodash?


Reply to this email directly or view it on GitHub.

Since lodash promotes itself as a drop-in replacement for underscore.js, I don't think there are much differences between them. Especially in this project, only the underscore namespace and some basic things like object chaining are used.
I have run the test with latest lodash and it passed all tests

Sounds great! Patches welcome, or if you can point me to a project that does this currently I can work on it when I get a chance. Thanks!

I wanted to make this work with both, but I was not really sure what was the best way to do it so I forked the project to work with lodash for now.

To have this library working for both lodash and underscore:

  • The browser version should already work without any changes.
  • For the Node version, a try/catch would fail when both underscore and lodash are available,
    so maybe allowing something like require('underscore.inflection/lodash') could be nice.
  • I do not really know what are the best practices with AMD for this kind of cases.
mjrk commented

@tuvistavie Thanks for your fork! I wanted to open an issue there to ask for the bower package - however, no issues can be opened in your fork. Is this on purpose? Are you planning to add the bower package?

Hi @mjrk,
That was not on purpose, I think it is the default behavior after a fork. I just restored issues there.
I do not want pollute this issue, so I am opening one in the fork.