New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

js-inflector

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-inflector

Basic naming utility for programmatically resolving plural, singular, capital, camel cased, and other word states.

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

js-inflector

Word magic.

Quick Start

```node var inflector = require('js-inflector'); ```
var inflect = inflector.start();

Examples

```node var someValue = 'tree'; ``` Modify word state: ```node var plural = inflect(someValue, 'plural'); //--> trees ```
var capital = inflect(someValue, 'capital');  
//--> Tree

Modify multiple word states at once:

var pluralAndCapital = inflect(someValue, ['capital', 'plural']);  
//--> Trees

Set a group state:

inflector.group({
  'properPlural': ['capital', 'plural']
});

With a group state:

var pluralAndCapital = inflect(someValue, 'properPlural');  
//--> Trees

Word States

- camelcase (camelcase | camel) - capitalize (cap | caps) - decapitalize (decapitalize | decap) - lowercase (lowercase | lower) - pluralize (plural | many) - singularize (singular | single) - uppercase (uppercase | upper)

Keywords

FAQs

Package last updated on 10 Nov 2015

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