{"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","tarball":"http://registry-npm.ywwl.com/i/download/i-0.3.6.tgz","integrity":"sha512-L3HtskNuuoYuBblACAG00UjaVSUb/09eLpkWEWcJ7n+/SmC1XikEckdXYpWYiVU+oFbvqp9GyGGwtzm21mDUOQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDkOyk1Otp2ZAkLqlR63OiQojk1Ev864W3h8iG7+TCnsgIhAOCxuWcbpG80/S+G/7jSJRQTFgn/eBmtUWYY9bM1Xt3N"}],"size":12852,"noattachment":false,"key":"/i/-/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":{},"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","publish_time":1507045365519,"_cnpm_publish_time":1507045365519,"dist-tags":{"latest":"0.3.7"}}