Skip to content
This repository was archived by the owner on Aug 9, 2025. It is now read-only.

Repository files navigation

case-modifier LicenseVersion

Convert string to target CaseType, like: camelCase, snakeCase, properCase, constantCase

Install

npm i case-modifier

Usage

import*asCaseModifierfrom'case-modifier'// type: camelCaseCaseModifier.CASE_CAMELCaseModifier.camelCase('we-will-rock-the-word')// weWillRockTheWord// type: snakeCaseCaseModifier.CASE_SNAKECaseModifier.snakeCase('we-will-rock-the-word')// we_will_rock_the_word// type: kebabCaseCaseModifier.CASE_KEBABCaseModifier.CASE_DASHCaseModifier.kebabCase('WeWillRockTheWord')// we-will-rock-the-word// type: properCaseCaseModifier.CASE_PROPERCaseModifier.CASE_PASCALCaseModifier.properCase('we-will-rock-the-word')// WeWillRockTheWord// type: constantCaseCaseModifier.CASE_CONSTANTCaseModifier.constantCase('WeWillRockTheWord')// WE_WILL_ROCK_THE_WORD// covert(str, caseType)CaseModifier.convert('we-will-rock-the-word')// weWillRockTheWordCaseModifier.convert('we-will-rock-the-word',CaseModifier.CASE_PROPER)// WeWillRockTheWord// if not support, just return source stringCaseModifier.convert('We will rock the word')// We will rock the word

About

Convert string to target CaseType, like: camelCase, snakeCase, properCase, constantCase...

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages