Detalhes do pacote

inflect

MSNexploder19.1kMIT0.5.0

A port of the Rails / ActiveSupport inflector to JavaScript.

inflect, activerecord, rails, activesupport

readme (leia-me)

Inflect Build Status

A port of the Rails / ActiveSupport inflector to JavaScript (node.js and browser compatible).

Install

npm install inflect

Client version

Client version (minified)

Documentation

Documentation

Usage

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

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

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

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

inflect.decapitalize('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

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Commit, do not mess with cakefile, package.json, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.

changelog (log de mudanças)

0.5.0 (29th July, 2020)

  • include client builds in npm build (thanks to pecord)
  • updated dependencies

0.4.1 (7th April, 2020)

  • updated to latest node
  • updated dependencies

0.4.0 (14th April, 2017)

  • fixed various default inflection bugs
  • updated to latest node
  • updated dependencies

0.3.0 (20th September, 2012)

  • added inflect.decapitalize (thanks to ikr)
  • updated dependencies

0.2.2 (19th March, 2012)

  • node 0.7 compatibility

0.2.1 (19th March, 2012)

  • fixed future node compatibility
  • updated dependencies

0.2.0 (4th December, 2011)

  • client side support

0.1.4 (10th November, 2011)

  • node 0.6.0 compatibility

0.1.3 (11th August, 2011)

  • fixed package to include already compiled javascript files

0.1.2 (7th August, 2011)

  • node 0.5.3 compatibility
  • added irregular zombie inflection

0.1.1 (31st July, 2011)

  • node 0.5.2 compatibility

0.1.0 (24th April, 2011)

  • Initial release