js-inflector

Word magic.

Showing:

Popularity

Downloads/wk

1

GitHub Stars

1

Maintenance

Last Commit

6yrs ago

Contributors

0

Package

Dependencies

1

Size (min+gzip)

20.1KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

js-inflector

Word magic.

Quick Start

```node var inflector = require('js-inflector'); ```
var inflect = inflector.start();

Examples

```node var someValue = 'tree'; ``` Modify word state: ```node var plural = inflect(someValue, 'plural'); //--> trees ```
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

Word States

- camelcase (camelcase | camel) - capitalize (cap | caps) - decapitalize (decapitalize | decap) - lowercase (lowercase | lower) - pluralize (plural | many) - singularize (singular | single) - uppercase (uppercase | upper)

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100