text-case
v1.0.9
Published
Convert text between `camelCase`, `PascalCase`, `Capital Case`, `Header-Case`, `Title Case`, `path/case`, `snake_case`, `param-case`, `dot.case`, `CONSTANT_CASE`, `lower case`, `lOWER CASE FIRST`, `UPPER CASE`, `Upper case first` and other
Downloads
11,482
Maintainers
Readme
Change Case
Convert text between
camelCase
,PascalCase
,Capital Case
,Header-Case
,Title Case
,path/case
,snake_case
,param-case
,dot.case
,no case
,CONSTANT_CASE
,lower case
,lOWER CASE FIRST
,UPPER CASE
,Upper case first
,sWaP cAsE
->SwAp CaSe
,Sentence Case
,isLowerCase
,isUpperCase
, and other
Installation
npm install text-case --save
Usage
import {
camelCase, // `camelCase`
pascalCase, // `PascalCase`
capitalCase, // `Capital Case`
headerCase, // `Header-Case`
titleCase, // `Title Case`
pathCase, // `path/case`
snakeCase, // `snake_case`
paramCase, // `param-case`
dotCase, // `dot.case`
noCase, // `no case`
constantCase, // `CONSTANT_CASE`
lowerCase, // `lower case`
lowerCaseFirst, // `lOWER CASE FIRST`
upperCase, // `UPPER CASE`
upperCaseFirst, // `Upper case first`
swapCase, // `sWaP cAsE` -> `SwAp CaSe`
sentenceCase,
isLowerCase,
isUpperCase,
} from "text-case";
Methods can also be installed independently. All functions also accept options
as the second argument.
License
MIT