{"_id":"i","_rev":"914005","name":"i","description":"custom inflections for nodejs","dist-tags":{"latest":"0.3.7"},"maintainers":[{"name":"pksunkara","email":"pavan.sss1991@gmail.com"}],"time":{"modified":"2021-09-21T10:50:56.000Z","created":"2012-02-22T14:20:25.535Z","0.3.7":"2021-09-21T10:50:32.501Z","0.3.6":"2017-10-03T15:42:45.519Z","0.3.5":"2016-05-04T09:54:41.664Z","0.3.4":"2016-01-14T20:05:31.241Z","0.3.3":"2015-04-02T18:40:55.722Z","0.3.1":"2012-09-18T10:49:47.315Z","0.3.0":"2012-06-01T04:59:19.189Z","0.2.0":"2012-02-22T14:20:25.535Z"},"users":{"kastor":true,"hollingberry":true,"itonyyo":true,"luissquall":true,"ninozhang":true,"danielbayley":true,"hoanganh25991":true,"gurunate":true,"derflatulator":true,"kkk123321":true,"cheapsteak":true,"alfeo92":true},"author":{"name":"Pavan Kumar Sunkara","email":"pavan.sss1991@gmail.com","url":"pksunkara.github.com"},"repository":{"type":"git","url":"git://github.com/pksunkara/inflect.git"},"versions":{"0.3.7":{"name":"i","version":"0.3.7","author":{"name":"Pavan Kumar Sunkara","email":"pavan.sss1991@gmail.com","url":"pksunkara.github.com"},"description":"custom inflections for nodejs","main":"./lib/inflect","repository":{"type":"git","url":"git://github.com/pksunkara/inflect.git"},"keywords":["singular","plural","camelize","underscore","dasherize","demodulize","ordinalize","uncountable","pluralize","singularize","titleize","tableize","classify","foreign_key"],"homepage":"http://pksunkara.github.com/inflect","scripts":{"test":"vows --spec $(find test -name '*-test.js')"},"contributors":[{"name":"Pavan Kumar Sunkara","email":"pavan.sss1991@gmail.com"}],"dependencies":{},"devDependencies":{"vows":"^0.8.2"},"engines":{"node":">=0.4"},"bugs":{"url":"https://github.com/pksunkara/inflect/issues"},"licenses":[{"type":"MIT","url":"https://github.com/pksunkara/inflect/raw/master/LICENSE"}],"gitHead":"71961bd70c2f516e03a1a73538f783ada3aab2c0","_id":"i@0.3.7","_nodeVersion":"12.22.6","_npmVersion":"7.21.0","dist":{"shasum":"2a7437a923d59c14b17243dc63a549af24d85799","size":13091,"noattachment":false,"key":"/i/-/i-0.3.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/i/download/i-0.3.7.tgz"},"_npmUser":{"name":"pksunkara","email":"pavan.sss1991@gmail.com"},"directories":{},"maintainers":[{"name":"pksunkara","email":"pavan.sss1991@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/i_0.3.7_1632221432344_0.7391110368311664"},"_hasShrinkwrap":false,"publish_time":1632221432501,"_cnpm_publish_time":1632221432501},"0.3.6":{"name":"i","version":"0.3.6","author":{"name":"Pavan Kumar Sunkara","email":"pavan.sss1991@gmail.com","url":"pksunkara.github.com"},"description":"custom inflections for nodejs","main":"./lib/inflect","repository":{"type":"git","url":"git://github.com/pksunkara/inflect.git"},"keywords":["singular","plural","camelize","underscore","dasherize","demodulize","ordinalize","uncountable","pluralize","singularize","titleize","tableize","classify","foreign_key"],"homepage":"http://pksunkara.github.com/inflect","scripts":{"test":"vows --spec $(find test -name '*-test.js')"},"contributors":[{"name":"Pavan Kumar Sunkara","email":"pavan.sss1991@gmail.com"}],"dependencies":{},"devDependencies":{"vows":"0.7.0"},"engines":{"node":">=0.4"},"bugs":{"url":"https://github.com/pksunkara/inflect/issues"},"licenses":[{"type":"MIT","url":"https://github.com/pksunkara/inflect/raw/master/LICENSE"}],"gitHead":"6bf6ca463906704775e0e91c86e365eba7f336c0","_id":"i@0.3.6","_shasum":"d96c92732076f072711b6b10fd7d4f65ad8ee23d","_from":".","_npmVersion":"4.6.1","_nodeVersion":"8.1.4","_npmUser":{"name":"pksunkara","email":"pavan.sss1991@gmail.com"},"dist":{"shasum":"d96c92732076f072711b6b10fd7d4f65ad8ee23d","size":12852,"noattachment":false,"key":"/i/-/i-0.3.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/i/download/i-0.3.6.tgz"},"maintainers":[{"name":"pksunkara","email":"pavan.sss1991@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/i-0.3.6.tgz_1507045364530_0.33664347720332444"},"directories":{},"publish_time":1507045365519,"_cnpm_publish_time":1507045365519,"_hasShrinkwrap":false},"0.3.5":{"name":"i","version":"0.3.5","author":{"name":"Pavan Kumar Sunkara","email":"pavan.sss1991@gmail.com","url":"pksunkara.github.com"},"description":"custom inflections for nodejs","main":"./lib/inflect","repository":{"type":"git","url":"git://github.com/pksunkara/inflect.git"},"keywords":["singular","plural","camelize","underscore","dasherize","demodulize","ordinalize","uncountable","pluralize","singularize","titleize","tableize","classify","foreign_key"],"homepage":"http://pksunkara.github.com/inflect","scripts":{"test":"vows --spec $(find test -name '*-test.js')"},"contributors":[{"name":"Pavan Kumar Sunkara","email":"pavan.sss1991@gmail.com"}],"dependencies":{},"devDependencies":{"vows":"0.7.0"},"engines":{"node":">=0.4"},"bugs":{"url":"https://github.com/pksunkara/inflect/issues"},"licenses":[{"type":"MIT","url":"https://github.com/pksunkara/inflect/raw/master/LICENSE"}],"gitHead":"bbcadd57a182007ab158acea511515b815385d4d","_id":"i@0.3.5","_shasum":"1d2b854158ec8169113c6cb7f6b6801e99e211d5","_from":".","_npmVersion":"2.14.9","_nodeVersion":"0.12.9","_npmUser":{"name":"pksunkara","email":"pavan.sss1991@gmail.com"},"dist":{"shasum":"1d2b854158ec8169113c6cb7f6b6801e99e211d5","size":12832,"noattachment":false,"key":"/i/-/i-0.3.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/i/download/i-0.3.5.tgz"},"maintainers":[{"name":"pksunkara","email":"pavan.sss1991@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/i-0.3.5.tgz_1462355680372_0.1744775390252471"},"directories":{},"publish_time":1462355681664,"_cnpm_publish_time":1462355681664,"_hasShrinkwrap":false},"0.3.4":{"name":"i","version":"0.3.4","author":{"name":"Pavan Kumar Sunkara","email":"pavan.sss1991@gmail.com","url":"pksunkara.github.com"},"description":"custom inflections for nodejs","main":"./lib/inflect","repository":{"type":"git","url":"git://github.com/pksunkara/inflect.git"},"keywords":["singular","plural","camelize","underscore","dasherize","demodulize","ordinalize","uncountable","pluralize","singularize","titleize","tableize","classify","foreign_key"],"homepage":"http://pksunkara.github.com/inflect","scripts":{"test":"vows --spec $(find test -name '*-test.js')"},"contributors":[{"name":"Pavan Kumar Sunkara","email":"pavan.sss1991@gmail.com"}],"dependencies":{},"devDependencies":{"vows":"0.7.0"},"engines":{"node":">=0.4"},"bugs":{"url":"https://github.com/pksunkara/inflect/issues"},"licenses":[{"type":"MIT","url":"https://github.com/pksunkara/inflect/raw/master/LICENSE"}],"gitHead":"355009895db1bd8dcceaa687b53fe085fc873b88","_id":"i@0.3.4","_shasum":"e1918d417b363a544e0e4a9b83c36dce1f85c91d","_from":".","_npmVersion":"2.14.9","_nodeVersion":"0.12.9","_npmUser":{"name":"pksunkara","email":"pavan.sss1991@gmail.com"},"maintainers":[{"name":"pksunkara","email":"pavan.sss1991@gmail.com"}],"dist":{"shasum":"e1918d417b363a544e0e4a9b83c36dce1f85c91d","size":12802,"noattachment":false,"key":"/i/-/i-0.3.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/i/download/i-0.3.4.tgz"},"directories":{},"publish_time":1452801931241,"_cnpm_publish_time":1452801931241,"_hasShrinkwrap":false},"0.3.3":{"name":"i","version":"0.3.3","author":{"name":"Pavan Kumar Sunkara","email":"pavan.sss1991@gmail.com","url":"pksunkara.github.com"},"description":"custom inflections for nodejs","main":"./lib/inflect","repository":{"type":"git","url":"git://github.com/pksunkara/inflect.git"},"keywords":["singular","plural","camelize","underscore","dasherize","demodulize","ordinalize","uncountable","pluralize","singularize","titleize","tableize","classify","foreign_key"],"homepage":"http://pksunkara.github.com/inflect","scripts":{"test":"vows --spec $(find test -name '*-test.js')"},"contributors":[{"name":"Pavan Kumar Sunkara","email":"pavan.sss1991@gmail.com"}],"dependencies":{},"devDependencies":{"vows":"~0.6.1"},"engines":{"node":">=0.4"},"bugs":{"url":"https://github.com/pksunkara/inflect/issues"},"licenses":[{"type":"MIT","url":"https://github.com/pksunkara/inflect/raw/master/LICENSE"}],"gitHead":"f6495e42873fe5b3ca80b060bc274662c3ed610b","_id":"i@0.3.3","_shasum":"0ff9a5eb743504aa8ac26a84f84c641287ff24cd","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"pksunkara","email":"pavan.sss1991@gmail.com"},"maintainers":[{"name":"pksunkara","email":"pavan.sss1991@gmail.com"}],"dist":{"shasum":"0ff9a5eb743504aa8ac26a84f84c641287ff24cd","size":12490,"noattachment":false,"key":"/i/-/i-0.3.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/i/download/i-0.3.3.tgz"},"directories":{},"publish_time":1428000055722,"_cnpm_publish_time":1428000055722,"_hasShrinkwrap":false},"0.3.1":{"name":"i","version":"0.3.1","author":{"name":"Pavan Kumar Sunkara","email":"pavan.sss1991@gmail.com","url":"pksunkara.github.com"},"description":"custom inflections for nodejs","main":"./lib/inflect","repository":{"type":"git","url":"git://github.com/pksunkara/inflect.git"},"keywords":["singular","plural","camelize","underscore","dasherize","demodulize","ordinalize","uncountable","pluralize","singularize","titleize","tableize","classify","foreign_key"],"homepage":"http://pksunkara.github.com/inflect","scripts":{"test":"./node_modules/.bin/vows --spec $(find test -name '*-test.js')"},"contributors":[{"name":"Pavan Kumar Sunkara","email":"pavan.sss1991@gmail.com"}],"dependencies":{},"devDependencies":{"vows":"~0.6.1"},"engines":{"node":">=0.4"},"bugs":{"url":"https://github.com/pksunkara/inflect/issues"},"licenses":[{"type":"MIT","url":"https://github.com/pksunkara/inflect/raw/master/LICENSE"}],"_id":"i@0.3.1","dist":{"shasum":"6ecf7847caed3168b17b86ccc390d7b805be0ee4","size":12561,"noattachment":false,"key":"/i/-/i-0.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/i/download/i-0.3.1.tgz"},"_npmVersion":"1.1.54","_npmUser":{"name":"pksunkara","email":"pavan.sss1991@gmail.com"},"maintainers":[{"name":"pksunkara","email":"pavan.sss1991@gmail.com"}],"directories":{},"publish_time":1347965387315,"_hasShrinkwrap":false,"_cnpm_publish_time":1347965387315},"0.3.0":{"name":"i","version":"0.3.0","author":{"name":"Pavan Kumar Sunkara","email":"pavan.sss1991@gmail.com","url":"pksunkara.github.com"},"description":"custom inflections for nodejs","main":"./lib/inflect","repository":{"type":"git","url":"git://github.com/pksunkara/inflect.git"},"keywords":["singular","plural","camelize","underscore","dasherize","demodulize","ordinalize","uncountable","pluralize","singularize","titleize","tableize","classify","foreign_key"],"homepage":"http://pksunkara.github.com/inflect","scripts":{"test":"./node_modules/.bin/vows --spec $(find test -name '*-test.js')"},"contributors":[{"name":"Pavan Kumar Sunkara","email":"pavan.sss1991@gmail.com"}],"dependencies":{},"devDependencies":{"vows":"~0.6.1"},"engines":{"node":">=0.4"},"bugs":{"url":"https://github.com/pksunkara/inflect/issues"},"licenses":[{"type":"MIT","url":"https://github.com/pksunkara/inflect/raw/master/LICENSE"}],"_npmUser":{"name":"pksunkara","email":"pavan.sss1991@gmail.com"},"_id":"i@0.3.0","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.12","_nodeVersion":"v0.6.14","_defaultsLoaded":true,"dist":{"shasum":"1b49d1b29a738964381a988d083e82e85facbde1","size":12696,"noattachment":false,"key":"/i/-/i-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/i/download/i-0.3.0.tgz"},"maintainers":[{"name":"pksunkara","email":"pavan.sss1991@gmail.com"}],"directories":{},"publish_time":1338526759189,"_hasShrinkwrap":false,"_cnpm_publish_time":1338526759189},"0.2.0":{"name":"i","version":"0.2.0","author":{"name":"Pavan Kumar Sunkara","email":"pavan.sss1991@gmail.com","url":"pksunkara.github.com"},"description":"custom inflections for nodejs","main":"./lib/inflect","repository":{"type":"git","url":"git://github.com/pksunkara/inflect.git"},"keywords":["singular","plural","camelize","underscore","dasherize","demodulize","ordinalize","uncountable","pluralize","singularize","titleize","tableize","classify","foreign_key"],"homepage":"http://pksunkara.github.com/inflect","scripts":{"test":"vows --spec $(find test -name '*-test.js')"},"contributors":[{"name":"Pavan Kumar Sunkara","email":"pavan.sss1991@gmail.com"}],"dependencies":{},"devDependencies":{"vows":"~0.6.1"},"engines":{"node":">=0.4"},"bugs":{"url":"https://github.com/pksunkara/inflect/issues"},"licenses":[{"type":"MIT","url":"https://github.com/pksunkara/inflect/raw/master/LICENSE"}],"_npmUser":{"name":"pksunkara","email":"pavan.sss1991@gmail.com"},"_id":"i@0.2.0","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.0-2","_nodeVersion":"v0.6.0","_defaultsLoaded":true,"dist":{"shasum":"70dd5c41ba1b188c9066c57376fedb153fc9ee50","size":12522,"noattachment":false,"key":"/i/-/i-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/i/download/i-0.2.0.tgz"},"maintainers":[{"name":"pksunkara","email":"pavan.sss1991@gmail.com"}],"directories":{},"publish_time":1329920425535,"_hasShrinkwrap":false,"_cnpm_publish_time":1329920425535}},"readme":"# inflect\n\ncustomizable inflections for nodejs\n\n**NOTE: 0.3.2 was accidentally unpublished from the server and npm doesn't allow me to publish it back. Please upgrade to 0.3.3**\n\n## Installation\n\n```bash\nnpm install i\n```\n\n## Usage\n\nRequire the module before using\n\n```js\nvar inflect = require('i')();\n```\n\nAll the below api functions can be called directly on a string\n\n```js\ninflect.titleize('messages to store') // === 'Messages To Store'\n'messages to store'.titleize // === 'Messages To Store'\n```\n\nonly if `true` is passed while initiating\n\n```js\nvar inflect = require('i')(true);\n```\n\n### Pluralize\n\n```js\ninflect.pluralize('person'); // === 'people'\ninflect.pluralize('octopus'); // === 'octopi'\ninflect.pluralize('Hat'); // === 'Hats'\n```\n\n### Singularize\n\n```js\ninflect.singularize('people'); // === 'person'\ninflect.singularize('octopi'); // === 'octopus'\ninflect.singularize('Hats'); // === 'Hat'\n```\n\n### Camelize\n\n```js\ninflect.camelize('message_properties'); // === 'MessageProperties'\ninflect.camelize('message_properties', false); // === 'messageProperties'\n```\n\n### Underscore\n\n```js\ninflect.underscore('MessageProperties'); // === 'message_properties'\ninflect.underscore('messageProperties'); // === 'message_properties'\n```\n\n### Humanize\n\n```js\ninflect.humanize('message_id'); // === 'Message'\n```\n\n### Dasherize\n\n```js\ninflect.dasherize('message_properties'); // === 'message-properties'\ninflect.dasherize('Message Properties'); // === 'Message Properties'\n```\n\n### Titleize\n\n```js\ninflect.titleize('message_properties'); // === 'Message Properties'\ninflect.titleize('message properties to keep'); // === 'Message Properties to Keep'\n```\n\n### Demodulize\n\n```js\ninflect.demodulize('Message.Bus.Properties'); // === 'Properties'\n```\n\n### Tableize\n\n```js\ninflect.tableize('MessageBusProperty'); // === 'message_bus_properties'\n```\n\n### Classify\n\n```js\ninflect.classify('message_bus_properties'); // === 'MessageBusProperty'\n```\n\n### Foreign key\n\n```js\ninflect.foreign_key('MessageBusProperty'); // === 'message_bus_property_id'\ninflect.foreign_key('MessageBusProperty', false); // === 'message_bus_propertyid'\n```\n\n### Ordinalize\n\n```js\ninflect.ordinalize( '1' ); // === '1st'\n```\n\n## Custom rules for inflection\n\n### Custom plural\n\nWe can use regexp in any of these custom rules\n\n```js\ninflect.inflections.plural('person', 'guys');\ninflect.pluralize('person'); // === 'guys'\ninflect.singularize('guys'); // === 'guy'\n```\n\n### Custom singular\n\n```js\ninflect.inflections.singular('guys', 'person')\ninflect.singularize('guys'); // === 'person'\ninflect.pluralize('person'); // === 'people'\n```\n\n### Custom irregular\n\n```js\ninflect.inflections.irregular('person', 'guys')\ninflect.pluralize('person'); // === 'guys'\ninflect.singularize('guys'); // === 'person'\n```\n\n### Custom human\n\n```js\ninflect.inflections.human(/^(.*)_cnt$/i, '$1_count');\ninflect.humanize('jargon_cnt'); // === 'Jargon count'\n```\n\n### Custom uncountable\n\n```js\ninflect.inflections.uncountable('oil')\ninflect.pluralize('oil'); // === 'oil'\ninflect.singularize('oil'); // === 'oil'\n```\n\n## Contributors\nHere is a list of [Contributors](http://github.com/pksunkara/inflect/contributors)\n\n### TODO\n\n- More obscure test cases\n\n__I accept pull requests and guarantee a reply back within a day__\n\n## License\nMIT/X11\n\n## Bug Reports\nReport [here](http://github.com/pksunkara/inflect/issues). __Guaranteed reply within a day__.\n\n## Contact\nPavan Kumar Sunkara (pavan.sss1991@gmail.com)\n\nFollow me on [github](https://github.com/users/follow?target=pksunkara), [twitter](http://twitter.com/pksunkara)\n","_attachments":{},"homepage":"http://pksunkara.github.com/inflect","bugs":{"url":"https://github.com/pksunkara/inflect/issues"}}