@kaelyx/ts-kit / string / ConvertCaseStyle
Variable: ConvertCaseStyle
constConvertCaseStyle:object
Defined in: string/convert-case/convert-case.types.ts:18
The cases that convertCase can produce, for ConvertCaseOptions.to. Each example converts the words "hello world".
Type Declaration
ada
readonlyada:"ada"='ada'
Hello_World
camel
readonlycamel:"camel"='camel'
helloWorld
cobol
readonlycobol:"cobol"='cobol'
HELLO-WORLD
constant
readonlyconstant:"constant"='constant'
HELLO_WORLD
flat
readonlyflat:"flat"='flat'
helloworld
kebab
readonlykebab:"kebab"='kebab'
hello-world
lower
readonlylower:"lower"='lower'
hello world
pascal
readonlypascal:"pascal"='pascal'
HelloWorld
snake
readonlysnake:"snake"='snake'
hello_world
title
readonlytitle:"title"='title'
Hello World
train
readonlytrain:"train"='train'
Hello-World
upper
readonlyupper:"upper"='upper'
HELLO WORLD
upperFlat
readonlyupperFlat:"upperFlat"='upperFlat'
HELLOWORLD
Example
convertCase('helloWorld', { to: ConvertCaseStyle.snake }) // 'hello_world'
convertCase('helloWorld', { to: 'snake' }) // the same: the plain string also works