Socket
Socket
Sign inDemoInstall

change-case

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

change-case

Transform a string between `camelCase`, `PascalCase`, `Capital Case`, `snake_case`, `kebab-case`, `CONSTANT_CASE` and others


Version published
Weekly downloads
7.5M
increased by7.07%
Maintainers
1
Weekly downloads
 
Created

What is change-case?

The change-case package is a utility library that provides various functions to transform strings between different cases, such as camel case, snake case, kebab case, and more. It is useful for formatting strings in different coding conventions or textual formats.

What are change-case's main functionalities?

camelCase

Converts a string to camel case.

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

snakeCase

Converts a string to snake case.

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

kebabCase

Converts a string to kebab case.

const { kebabCase } = require('change-case');
console.log(kebabCase('test string')); // 'test-string'

titleCase

Converts a string to title case.

const { titleCase } = require('change-case');
console.log(titleCase('test string')); // 'Test String'

constantCase

Converts a string to constant case.

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

Other packages similar to change-case

Keywords

FAQs

Package last updated on 14 Jan 2024

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