Skip to content

Interface: TitleCaseOptions

Defined in: utils/string/toTitleCase.ts:4

Options for toTitleCase.

Properties

minorWords?

optional minorWords: string[]

Defined in: utils/string/toTitleCase.ts:13

Words that should usually remain in lowercase when they are not the first or last word of the string.

Defaults to a small English list such as: "and", "or", "of", "the", "a", "an", "in", "on", "at", "for", "by", "to", "from", "with".


preserveUpper?

optional preserveUpper: boolean

Defined in: utils/string/toTitleCase.ts:20

Whether to preserve existing ALL-CAPS words (e.g. "API", "HTTP").

Defaults to true.

Released under the MIT License.