Skip to main content

Function: toTitleCase()

toTitleCase(str: string, options: ToTitleCaseOptions): string

Converts a string to Title Case

Parameters

ParameterTypeDescription
strstringThe string to title case
optionsToTitleCaseOptionsThe options to use when converting the string

Returns

string

Description

This is designed to also ensure common Discord PascalCased strings are put in their TitleCase baseVariants.

You can also provide your own variants to merge with the baseVariants for your own functionality use.

Source

lib/toTitleCase.ts:35