
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
inflector-js
Advanced tools
A lightweight JavaScript utility for smart word transformations – from singular to plural, snake_case to camelCase, and everything in between.
A lightweight JavaScript utility for smart word transformations – from singular to plural, snake_case to camelCase, and everything in between.
npm install inflector-js
Node JS
var Inflector = require('inflector-js');
import Inflector from 'inflector-js';
console.log(Inflector.camelize('message_properties'));
import { humanize } from 'inflector-js';
console.log(humanize('message_properties'));
<script
type="text/javascript"
src="assets/inflector-js/dist/index.global.js"
></script>
console.log(Inflector.camelize('message_properties'));
Inflector.pluralize('person') -> 'people'
Inflector.pluralize('octopus') -> 'octopi'
Inflector.pluralize('Hat') -> 'Hats'
Inflector.pluralize('person', 'guys') -> 'guys'
Inflector.singularize('person') -> 'person'
Inflector.singularize('octopi') -> 'octopus'
Inflector.singularize('hats') -> 'hat'
Inflector.singularize('guys', 'person') -> 'person'
Inflector.camelize('message_properties') -> 'MessageProperties'
Inflector.camelize('message_properties', true) -> 'messageProperties'
Inflector.underscore('MessageProperties') -> 'message_properties'
Inflector.underscore('messageProperties') -> 'message_properties'
Inflector.humanize('message_properties') -> 'Message properties'
Inflector.humanize('message_properties') -> 'message properties'
Inflector.capitalize('message_properties') -> 'Message_properties'
Inflector.capitalize('message properties') -> 'Message properties'
Inflector.dasherize('message_properties') -> 'message-properties'
Inflector.dasherize('message properties') -> 'message-properties'
Inflector.camel2words('message_properties') -> 'Message Properties'
Inflector.camel2words('message properties') -> 'Message Properties'
Inflector.camel2words('Message_propertyId', true) -> 'Message Properties Id'
Inflector.demodulize('Message::Bus::Properties') -> 'Properties'
Inflector.tableize('MessageBusProperty') -> 'message_bus_properties'
Inflector.classify('message_bus_properties') -> 'MessageBusProperty'
Inflector.foreignKey('MessageBusProperty') -> 'message_bus_property_id'
Inflector.foreignKey('MessageBusProperty', true) -> 'message_bus_propertyid'
Inflector.ordinalize('the 1 pitch') -> 'the 1st pitch'
Created and maintained by Dida Nurwanda
didanurwanda@gmail.com
This project is licensed under the MIT. See the LICENSE file for more details.
FAQs
A lightweight JavaScript utility for smart word transformations – from singular to plural, snake_case to camelCase, and everything in between.
We found that inflector-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.