{"_id":"underscore.inflections","_rev":"2795203","name":"underscore.inflections","description":"Port of ActiveSupport::Inflector::Inflections for underscore.js","dist-tags":{"latest":"0.2.1"},"maintainers":[{"name":"geetarista","email":"geetarista@gmail.com"}],"time":{"modified":"2022-07-11T15:51:14.000Z","created":"2012-06-13T18:55:18.002Z","0.2.1":"2013-08-13T19:19:48.684Z","0.2.0":"2013-08-01T01:11:25.807Z","0.1.5":"2013-04-10T18:44:55.696Z","0.1.4":"2012-12-06T18:04:27.036Z","0.1.3":"2012-06-14T16:02:27.873Z","0.1.2":"2012-06-13T23:43:28.844Z","0.1.1":"2012-06-13T23:38:38.846Z","0.1.0":"2012-06-13T18:55:18.002Z"},"users":{},"author":{"name":"Robby Colvin","email":"geetarista@gmail.com","url":"http://robbycolvin.com"},"repository":{"type":"git","url":"http://github.com/geetarista/underscore.inflections.git"},"versions":{"0.2.1":{"name":"underscore.inflections","description":"Port of ActiveSupport::Inflector::Inflections for underscore.js","version":"0.2.1","keywords":["inflections","inflector","underscore"],"homepage":"https://geetarista.github.com/underscore.inflections","bugs":"https://github.com/geetarista/underscore.inflections/issues","author":{"name":"Robby Colvin","email":"geetarista@gmail.com","url":"http://robbycolvin.com"},"repository":{"type":"git","url":"http://github.com/geetarista/underscore.inflections.git"},"dependencies":{"underscore":">=1.0","underscore.string":">=2.0.0"},"devDependencies":{"chai":"~1.0","coffee-script":"~1.3","docco":"~0.3","mocha":"~1.9","should":"~0.6"},"scripts":{"test":"mocha test/*.coffee"},"main":"lib/underscore.inflections.js","readmeFilename":"README.md","_id":"underscore.inflections@0.2.1","dist":{"shasum":"101bd359e02af293aa5a1062748e963e208767f1","size":69090,"noattachment":false,"key":"/underscore.inflections/-/underscore.inflections-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/underscore.inflections/download/underscore.inflections-0.2.1.tgz"},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"geetarista","email":"geetarista@gmail.com"},"maintainers":[{"name":"geetarista","email":"geetarista@gmail.com"}],"directories":{},"publish_time":1376421588684,"_hasShrinkwrap":false,"_cnpm_publish_time":1376421588684,"_cnpmcore_publish_time":"2021-12-16T21:24:02.584Z"},"0.2.0":{"name":"underscore.inflections","description":"Port of ActiveSupport::Inflector::Inflections for underscore.js","version":"0.2.0","keywords":["inflections","inflector","underscore"],"homepage":"https://geetarista.github.com/underscore.inflections","bugs":"https://github.com/geetarista/underscore.inflections/issues","author":{"name":"Robby Colvin","email":"geetarista@gmail.com","url":"http://robbycolvin.com"},"repository":{"type":"git","url":"http://github.com/geetarista/underscore.inflections.git"},"dependencies":{"underscore":"~1.3","underscore.string":"~2.3.0"},"devDependencies":{"chai":"~1.0","coffee-script":"~1.3","docco":"~0.3","mocha":"~1.9","should":"~0.6"},"scripts":{"test":"mocha test/*.coffee"},"main":"lib/underscore.inflections.js","readmeFilename":"README.md","_id":"underscore.inflections@0.2.0","dist":{"shasum":"d33dc0fa68b31e389ee413b598ddf8bd6b846dbf","size":69080,"noattachment":false,"key":"/underscore.inflections/-/underscore.inflections-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/underscore.inflections/download/underscore.inflections-0.2.0.tgz"},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"geetarista","email":"geetarista@gmail.com"},"maintainers":[{"name":"geetarista","email":"geetarista@gmail.com"}],"directories":{},"publish_time":1375319485807,"_hasShrinkwrap":false,"_cnpm_publish_time":1375319485807,"_cnpmcore_publish_time":"2021-12-16T21:24:02.839Z"},"0.1.5":{"name":"underscore.inflections","description":"Port of ActiveSupport::Inflector::Inflections for underscore.js","version":"0.1.5","keywords":["inflections","inflector","underscore"],"homepage":"https://geetarista.github.com/underscore.inflections","bugs":"https://github.com/geetarista/underscore.inflections/issues","author":{"name":"Robby Colvin","email":"geetarista@gmail.com","url":"http://robbycolvin.com"},"repository":{"type":"git","url":"http://github.com/geetarista/underscore.inflections.git"},"dependencies":{"underscore":"~1.3"},"devDependencies":{"chai":"~1.0","coffee-script":"~1.3","docco":"~0.3","mocha":"~1.9","should":"~0.6"},"scripts":{"test":"mocha test/*.coffee"},"main":"lib/underscore.inflections.js","readmeFilename":"README.md","_id":"underscore.inflections@0.1.5","dist":{"shasum":"c2f153f572b7f8cba10dd3cdd820499a68f3407f","size":61482,"noattachment":false,"key":"/underscore.inflections/-/underscore.inflections-0.1.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/underscore.inflections/download/underscore.inflections-0.1.5.tgz"},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"geetarista","email":"geetarista@gmail.com"},"maintainers":[{"name":"geetarista","email":"geetarista@gmail.com"}],"directories":{},"publish_time":1365619495696,"_hasShrinkwrap":false,"_cnpm_publish_time":1365619495696,"_cnpmcore_publish_time":"2021-12-16T21:24:03.095Z"},"0.1.4":{"name":"underscore.inflections","description":"Port of ActiveSupport::Inflector::Inflections for underscore.js","version":"0.1.4","keywords":["inflections","inflector","underscore"],"homepage":"https://geetarista.github.com/underscore.inflections","bugs":"https://github.com/geetarista/underscore.inflections/issues","author":{"name":"Robby Colvin","email":"geetarista@gmail.com","url":"http://robbycolvin.com"},"repository":{"type":"git","url":"http://github.com/geetarista/underscore.inflections.git"},"dependencies":{"underscore":"~1.3"},"devDependencies":{"chai":"~1.0","coffee-script":"~1.3","docco":"~0.3","mocha":"~1.1","should":"~0.6"},"scripts":{"test":"mocha test/*.coffee"},"main":"lib/underscore.inflections.js","readmeFilename":"README.md","_id":"underscore.inflections@0.1.4","dist":{"shasum":"ccde08736e67bb52979669aa827ac8b2cf9f03ca","size":54715,"noattachment":false,"key":"/underscore.inflections/-/underscore.inflections-0.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/underscore.inflections/download/underscore.inflections-0.1.4.tgz"},"_npmVersion":"1.1.65","_npmUser":{"name":"geetarista","email":"geetarista@gmail.com"},"maintainers":[{"name":"geetarista","email":"geetarista@gmail.com"}],"directories":{},"publish_time":1354817067036,"_hasShrinkwrap":false,"_cnpm_publish_time":1354817067036,"_cnpmcore_publish_time":"2021-12-16T21:24:03.322Z"},"0.1.3":{"name":"underscore.inflections","description":"Port of ActiveSupport::Inflector::Inflections for underscore.js","version":"0.1.3","keywords":["inflections","inflector","underscore"],"homepage":"https://geetarista.github.com/underscore.inflections","bugs":{"name":"https://github.com/geetarista/underscore.inflections/issues"},"author":{"name":"Robby Colvin","email":"geetarista@gmail.com","url":"http://robbycolvin.com"},"repository":{"type":"git","url":"git://github.com/geetarista/underscore.inflections.git"},"dependencies":{"underscore":"~1.3"},"devDependencies":{"chai":"~1.0","coffee-script":"~1.3","docco":"~0.3","mocha":"~1.1","should":"~0.6"},"scripts":{"test":"mocha test/*.coffee"},"main":"lib/underscore.inflections.js","_npmUser":{"name":"geetarista","email":"geetarista@gmail.com"},"_id":"underscore.inflections@0.1.3","optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.12","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"b0df7b9419b2c55a34953a8e8e43e054830de933","size":54991,"noattachment":false,"key":"/underscore.inflections/-/underscore.inflections-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/underscore.inflections/download/underscore.inflections-0.1.3.tgz"},"maintainers":[{"name":"geetarista","email":"geetarista@gmail.com"}],"directories":{},"publish_time":1339689747873,"_hasShrinkwrap":false,"_cnpm_publish_time":1339689747873,"_cnpmcore_publish_time":"2021-12-16T21:24:03.718Z"},"0.1.2":{"name":"underscore.inflections","description":"Port of ActiveSupport::Inflector::Inflections for underscore.js","version":"0.1.2","keywords":["inflections","inflector","underscore"],"homepage":"https://geetarista.github.com/underscore.inflections","bugs":{"name":"https://github.com/geetarista/underscore.inflections/issues"},"author":{"name":"Robby Colvin","email":"geetarista@gmail.com","url":"http://robbycolvin.com"},"repository":{"type":"git","url":"git://github.com/geetarista/underscore.inflections.git"},"dependencies":{"underscore":"~1.3"},"devDependencies":{"chai":"~1.0","coffee-script":"~1.3","docco":"~0.3","mocha":"~1.1","should":"~0.6"},"scripts":{"test":"mocha test/*.coffee"},"main":"lib/underscore.inflections.js","_npmUser":{"name":"geetarista","email":"geetarista@gmail.com"},"_id":"underscore.inflections@0.1.2","optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.12","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"26925282cf376945ddc1c294e0cef95e3537b1d8","size":55021,"noattachment":false,"key":"/underscore.inflections/-/underscore.inflections-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/underscore.inflections/download/underscore.inflections-0.1.2.tgz"},"maintainers":[{"name":"geetarista","email":"geetarista@gmail.com"}],"directories":{},"publish_time":1339631008844,"_hasShrinkwrap":false,"_cnpm_publish_time":1339631008844,"_cnpmcore_publish_time":"2021-12-16T21:24:03.998Z"},"0.1.1":{"name":"underscore.inflections","description":"Port of ActiveSupport::Inflector::Inflections for underscore.js","version":"0.1.1","keywords":["inflections","inflector","underscore"],"homepage":"https://geetarista.github.com/underscore.inflections","bugs":{"name":"https://github.com/geetarista/underscore.inflections/issues"},"author":{"name":"Robby Colvin","email":"geetarista@gmail.com","url":"http://robbycolvin.com"},"repository":{"type":"git","url":"git://github.com/geetarista/underscore.inflections.git"},"dependencies":{"underscore":"~1.3"},"devDependencies":{"chai":"~1.0","coffee-script":"~1.3","docco":"~0.3","mocha":"~1.1","should":"~0.6"},"scripts":{"test":"mocha test/*.coffee"},"main":"lib/underscore.inflections.js","_npmUser":{"name":"geetarista","email":"geetarista@gmail.com"},"_id":"underscore.inflections@0.1.1","optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.12","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"cb256efee2719bffa534a91bbcd1bf6739011ab9","size":54336,"noattachment":false,"key":"/underscore.inflections/-/underscore.inflections-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/underscore.inflections/download/underscore.inflections-0.1.1.tgz"},"maintainers":[{"name":"geetarista","email":"geetarista@gmail.com"}],"directories":{},"publish_time":1339630718846,"_hasShrinkwrap":false,"_cnpm_publish_time":1339630718846,"_cnpmcore_publish_time":"2021-12-16T21:24:04.252Z"},"0.1.0":{"name":"underscore.inflections","description":"Port of ActiveSupport::Inflector::Inflections for underscore.js","version":"0.1.0","keywords":["inflections","inflector","underscore"],"homepage":"https://geetarista.github.com/underscore.inflections","bugs":{"name":"https://github.com/geetarista/underscore.inflections/issues"},"author":{"name":"Robby Colvin","email":"geetarista@gmail.com","url":"http://robbycolvin.com"},"repository":{"type":"git","url":"git://github.com/geetarista/underscore.inflections.git"},"dependencies":{"underscore":"~1.3"},"devDependencies":{"chai":"~1.0","coffee-script":"~1.3","docco":"~0.3","mocha":"~1.1","should":"~0.6"},"scripts":{"test":"mocha"},"main":"lib/underscore.inflections.js","_npmUser":{"name":"geetarista","email":"geetarista@gmail.com"},"_id":"underscore.inflections@0.1.0","optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.12","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"df4c7726c0e1c294c30f4e606b5c35b3c1017b6a","size":53841,"noattachment":false,"key":"/underscore.inflections/-/underscore.inflections-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/underscore.inflections/download/underscore.inflections-0.1.0.tgz"},"maintainers":[{"name":"geetarista","email":"geetarista@gmail.com"}],"directories":{},"publish_time":1339613718002,"_hasShrinkwrap":false,"_cnpm_publish_time":1339613718002,"_cnpmcore_publish_time":"2021-12-16T21:24:04.537Z"}},"readme":"# underscore.inflections [![Build Status](https://secure.travis-ci.org/geetarista/underscore.inflections.png)](http://travis-ci.org/geetarista/underscore.inflections)\n\nPort of ActiveSupport::Inflector::Inflections for Underscore.js.\n\nWorks with browser or Node.js.\n\n## Introduction\n\nI created this underscore mixin after trying out every other inflection library out there. I've created this as a direct port of Rails' version as much as possible.\n\nNote that right now, this only handles methods found in ActiveSupport::Inflector::Inflections since that's all I need right now. I may eventually split this out into separate inflector mixins that match all of ActiveSupport's.\n\n## Setup\n\n### Browser\n\nInclude both underscore.js and underscore.inflections on your page:\n\n```html\n<script src=\"underscore.js\" type=\"text/javascript\"></script>\n<script src=\"underscore.inflections.js\" type=\"text/javascript\"></script>\n```\n\n### Node.js\n\nFirst, install the mixin through npm:\n\n```bash\nnpm install underscore.inflections\n```\n\nRequire underscore.js and underscore.inflections:\n\n```javascript\nvar _ = require('underscore');\n_.mixing(require('underscore.inflections'));\n```\n\n**Note**: When using underscore in Node's REPL, be sure to choose a variable other than `_`, as that is a special symbol used for showing the last return value.\n\n## Usage\n\n### Singularize\n\nConverts a word to its singular form.\n\nExamples:\n\n```javascript\n_.singularize('posts');    //=> 'post'\n_.singularize('octopi');   //=> 'octopus'\n_.singularize('sheep');    //=> 'sheep'\n_.singularize('words');    //=> 'words'\n```\n\n### Pluralize\n\nConverts a word to its pluralized form.\n\nExamples:\n\n```javascript\n_.singularize('post');      //=> 'posts'\n_.singularize('octopus');   //=> 'octopi'\n_.singularize('sheep');     //=> 'sheep'\n_.singularize('words');     //=> 'words'\n```\n\n## Customizing\n\n### Singular\n\nAdds a rule for singularizing a word.\n\nExample:\n\n```javascript\n_.singular(/^(ox)en/i, '\\1');\n```\n\n### Plural\n\nAdds a rule for pluralizing a word.\n\nExample:\n\n```javascript\n_.plural(/^(ox)$/i, '\\1en');\n```\n\n### Irregular\n\nAdds a rule for an irregular word.\n\nExample:\n\n```javascript\n_.irregular('person', 'people');\n```\n\n### Uncountable\n\nAdds a rule for an uncountable word or words.\n\nExample:\n\n```javascript\n_.uncountable(['fish', 'sheep']);\n```\n\n## License\n\nMIT. See `LICENSE`.\n","_attachments":{},"readmeFilename":"README.md","homepage":"https://geetarista.github.com/underscore.inflections","bugs":"https://github.com/geetarista/underscore.inflections/issues"}