Socket
Socket
Sign inDemoInstall

change-case-all

Package Overview
Dependencies
22
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    change-case-all

All change-case methods bundled in a single module


Version published
Maintainers
1
Created

Package description

What is change-case-all?

The change-case-all npm package is a utility library that provides a comprehensive set of functions for transforming the case of strings. It includes functionalities for converting strings to camel case, capital case, constant case, dot case, header case, no case, param case, pascal case, path case, sentence case, snake case, and swap case. This makes it a versatile tool for formatting strings in various coding and writing styles.

What are change-case-all's main functionalities?

Camel Case

Converts a string to camel case, which is a common case style in programming where the first letter of each word is capitalized except for the first word.

"use strict"; const { camelCase } = require('change-case-all'); console.log(camelCase('test string')); // 'testString'

Constant Case

Transforms a string to constant case, typically used for defining constants in programming, where all letters are uppercase and spaces are replaced by underscores.

"use strict"; const { constantCase } = require('change-case-all'); console.log(constantCase('test string')); // 'TEST_STRING'

Pascal Case

Converts a string to pascal case, similar to camel case but with the first letter of the first word also capitalized. Commonly used for class names in programming.

"use strict"; const { pascalCase } = require('change-case-all'); console.log(pascalCase('test string')); // 'TestString'

Snake Case

Transforms a string to snake case, where all letters are lowercase and spaces are replaced by underscores. Widely used in programming, especially in variable naming.

"use strict"; const { snakeCase } = require('change-case-all'); console.log(snakeCase('test string')); // 'test_string'

Other packages similar to change-case-all

Readme

Source

change-case-all

npm npm

Combined version of all change-case methods, so you do not need to install them separately. Tree shaking should still work if you use a module bundler.

Usage

npm install --save change-case-all
import { camelCase, upperCase, ... } from 'change-case-all';

Documentation

https://github.com/blakeembrey/change-case

Methods

Core

  • camelCase
  • capitalCase
  • constantCase
  • dotCase
  • headerCase
  • noCase
  • paramCase
  • pascalCase
  • pathCase
  • sentenceCase
  • snakeCase

Extended

  • lowerCase
  • localeLowerCase
  • lowerCaseFirst
  • spongeCase
  • swapCase
  • titleCase
  • upperCase
  • localeUpperCase
  • upperCaseFirst
  • isUpperCase
  • isLowerCase

Keywords

FAQs

Last updated on 25 Apr 2020

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc