toPascalCase
Creates a to pascal case transformation action.
Words are separated by _, - and ASCII whitespace, as well as by case and acronym boundaries.
Acronym runs are normalized to lowercase (e.g.
parseURLValue→ParseUrlValue) and digits stay attached to the preceding token (e.g.item2Name→Item2Name).
const Action = v.toPascalCase();
Returns
ActionToPascalCaseAction
Examples
The following examples show how toPascalCase can be used.
Pascal case string
Schema that transforms a string to pascal case.
const StringSchema = v.pipe(v.string(), v.toPascalCase());
Related
The following APIs can be combined with toPascalCase.
Schemas
Methods
Utils
© Fabian Hiller
Licensed under the MIT License.
https://valibot.dev/api/toPascalCase/