Fork me on GitHub

inflect by MSNexploder

A port of the Rails / ActiveSupport inflector to JavaScript.

Install

$ npm install inflect

Client version

Client version (minified)

Examples

  inflect.pluralize('user'); // users

  inflect.singularize('users'); // user

  inflect.camelize('users_controller'); // UsersController

  inflect.capitalize('user'); // User

  inflect.titleize('man from the boondocks'); // Man From The Boondocks

  inflect.underscore('UsersController'); // users_controller

  inflect.dasherize('puni_puni'); // puni-puni

  inflect.parameterize('Donald E. Knuth'); // donald-e-knuth

  inflect.humanize('employee_salary'); // Employee salary
  

Documentation

Annotated source

License

MIT

Authors

Stefan Huber (MSNexploder@gmail.com)

Contact

Stefan Huber (MSNexploder@gmail.com)

Download

You can download this project in either zip or tar formats.

You can also clone the project with Git by running:

$ git clone git://github.com/MSNexploder/inflect