Closed hakunin closed 8 years ago
It is a normal lodash mixin, so you use need to do
import _ from 'lodash';
import _inflection from 'lodash-inflection';
_.mixin(_inflection);
to get it to work. If you use it often, you can create a module which exports lodash with the module mixed in.
Thanks!
Does this always has to be mixed into lodash? I'm using lodash not by importing it completely, but by individually importing each lodash function I need:
import camelCase from 'lodash/camelCase';
console.log(camelCase('hello_world'));
Is there a way to include the functions in this library in a similar fashion? Perhaps something like this:
import pluralize from 'lodash-inflection/pluralize';
This is currently not supported, but a PR would be welcome as long as it does not break backward compatibility. Thanks.
As this issue is closed, apologies for commenting on it.
A colleague suggested I look into lodash pluralize
, and Google led me here. Another colleague then suggested:
Both modules do basically the same thing, the only noticeable difference is probably that this one is a lodash mixin and relies on lodash.
Hi, I am just starting with es6 and react and I know I need to do this to include lodash:
..but how do I include lodash-inflection?
As of now, I get