Skip to content

capitalize

capitalize(params): string

Defined in: strings/capitalize/index.ts:21

Capitalizes the first character of a string.

CapitalizeParams

The parameters object

string

The capitalized string

capitalize({ str: "hello" });
// => "Hello"

uppercase first, first letter uppercase, initial cap

Error if str is not a string