js-inflector
v0.0.1
Published
Basic naming utility for programmatically resolving plural, singular, capital, camel cased, and other word states.
Downloads
6
Maintainers
Readme
var inflect = inflector.start();
var capital = inflect(someValue, 'capital');
//--> Tree
Modify multiple word states at once:
var pluralAndCapital = inflect(someValue, ['capital', 'plural']);
//--> Trees
Set a group state:
inflector.group({
'properPlural': ['capital', 'plural']
});
With a group state:
var pluralAndCapital = inflect(someValue, 'properPlural');
//--> Trees