Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

inflector-js

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inflector-js

Inflector pluralizes and singularizes English nouns. It also contains some other useful methods.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

INFLECTOR-JS

Inflector pluralizes and singularizes English nouns. It also contains some other useful methods.

Download

NPM

npm install inflector-js --save

BOWER

bower install inflector-js --save

or download here

How to use

Node JS

var Inflector = require('inflector-js')

RequireJS

define(['bower_components/inflector-js/index'], function(Inflector) {
    // your code
});

Manual

<script type="text/javascript" src="bower_components/inflector-js/index.js"></script>

API

  • pluralize

Inflector.pluralize('person')           -> 'people'
Inflector.pluralize('octopus')          -> 'octopi'
Inflector.pluralize('Hat')              -> 'Hats'
Inflector.pluralize('person', 'guys')   -> 'guys' 

  • singularize
Inflector.singularize('person')         -> 'person'
Inflector.singularize('octopi')         -> 'octopus'
Inflector.singularize('hats')           -> 'hat'
Inflector.singularize('guys', 'person') -> 'person'
  • camelize
Inflector.camelize('message_properties')        -> 'MessageProperties'
Inflector.camelize('message_properties', true)  -> 'messageProperties'
  • underscore
Inflector.underscore('MessageProperties')       -> 'message_properties'
Inflector.underscore('messageProperties')       -> 'message_properties'
  • humanize
Inflector.humanize('message_properties')        -> 'Message properties'
Inflector.humanize('message_properties')        -> 'message properties'
  • capitalize
Inflector.capitalize('message_properties')      -> 'Message_properties'
Inflector.capitalize('message properties')      -> 'Message properties'
  • dasherize
Inflector.dasherize('message_properties')       -> 'message-properties'
Inflector.dasherize('message properties')       -> 'message-properties'
  • camel2words
Inflector.camel2words('message_properties')         -> 'Message Properties'
Inflector.camel2words('message properties')         -> 'Message Properties'
Inflactor.camel2words('Message_propertyId', true)   -> 'Message Properties Id'
  • demodulize
Inflector.demodulize('Message::Bus::Properties')    -> 'Properties'
  • tabelize
Inflector.tableize('MessageBusProperty')    -> 'message_bus_properties'
  • classify
Inflector.classify('message_bus_properties')    -> 'MessageBusProperty'
  • foreignKey
Inflector.foreignKey('MessageBusProperty')       -> 'message_bus_property_id'
Inflector.foreignKey('MessageBusProperty', true) -> 'message_bus_propertyid'
  • ordinalize
Inflector.ordinalize('the 1 pitch')     -> 'the 1st pitch'

Keywords

FAQs

Package last updated on 19 Mar 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc