Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 56 lines (30 sloc) 2.512 kb
ca5f223a »
2011-12-14 added build status to readme
1 # Inflect [![Build Status](https://secure.travis-ci.org/MSNexploder/inflect.png)](http://travis-ci.org/MSNexploder/inflect)
2
3 A port of the Rails / ActiveSupport inflector to JavaScript (node.js and browser compatible).
4
c196a666 »
2011-04-24 initial commit
5 ## Install
6
7 npm install inflect
8
c78b4bf9 »
2011-12-04 add links to client version
9 [Client version](https://raw.github.com/MSNexploder/inflect/master/client/inflect.js)
10
11 [Client version (minified)](https://raw.github.com/MSNexploder/inflect/master/client/inflect.min.js)
12
c196a666 »
2011-04-24 initial commit
13 ## Documentation
14
7153431a »
2011-08-13 Changed documentation link
15 [Documentation](http://msnexploder.github.com/inflect)
c196a666 »
2011-04-24 initial commit
16
17 ## Usage
18
19 inflect.pluralize('user'); // users
20
21 inflect.singularize('users'); // user
22
23 inflect.camelize('users_controller'); // UsersController
24
25 inflect.capitalize('user'); // User
26
7a9ea677 » ikr
2012-09-19 Introduce inflect.decapitalize()
27 inflect.decapitalize('User'); // user
28
c196a666 »
2011-04-24 initial commit
29 inflect.titleize('man from the boondocks'); // Man From The Boondocks
30
31 inflect.underscore('UsersController'); // users_controller
32
33 inflect.dasherize('puni_puni'); // puni-puni
34
35 inflect.parameterize('Donald E. Knuth'); // donald-e-knuth
36
37 inflect.humanize('employee_salary'); // Employee salary
38
39 ## Note on Patches/Pull Requests
40
41 * Fork the project.
42 * Make your feature addition or bug fix.
43 * 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)
44 * Send me a pull request. Bonus points for topic branches.
45
46 ## License
47
48 (The MIT License)
49
50 Copyright © 2011 Stefan Huber
51
52 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
53
54 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
55
56 THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Something went wrong with that request. Please try again.