GuobaGuoba Utils

pascal

@guoba-ai/utils / string / pascal

Function: pascal()

function pascal(str): string;

Defined in: string.ts:148

Convert a string to PascalCase.

Parameters

str

string

The string to convert

Returns

string

The PascalCase version of the string

Example

pascal('foo-bar') // 'FooBar'
pascal('fooBar') // 'FooBar'
pascal('foo_bar') // 'FooBar'

On this page