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

inflection

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inflection

A port of inflection-js to node.js module

  • 1.3.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.1M
decreased by-63.93%
Maintainers
1
Weekly downloads
 
Created

What is inflection?

The inflection npm package is a utility library that provides functions for transforming words between singular, plural, camel case, underscore, human-readable, and other forms. It is useful for developers who need to manipulate and format strings, particularly in the context of programming languages that use different naming conventions for variables, classes, and database entries.

What are inflection's main functionalities?

Pluralization and Singularization

Converts words from singular to plural and vice versa.

const inflection = require('inflection');

const singular = inflection.singularize('posts');
const plural = inflection.pluralize('post');

Camelizing and Underscoring

Converts strings to camel case or underscored form, useful for naming conventions in programming.

const inflection = require('inflection');

const camelized = inflection.camelize('message_properties');
const underscored = inflection.underscore('MessageProperties');

Humanizing

Transforms underscored strings into a human-readable form, often used for UI labels or titles.

const inflection = require('inflection');

const humanized = inflection.humanize('employee_id');

Titleizing

Capitalizes all the words and replaces some characters in the string to create a title.

const inflection = require('inflection');

const titleized = inflection.titleize('man from the boondocks');

Dasherizing

Replaces underscores with dashes in the string.

const inflection = require('inflection');

const dasherized = inflection.dasherize('puni_puni');

Other packages similar to inflection

Keywords

FAQs

Package last updated on 03 Jul 2014

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