API Reference

Returns a string with the first letter of each word capitalized.

function capitalize(str: string, lowercaseOthers?: boolean): string

// Example:

 capitalize("stephen") //=> "Stephen"

 capitalize("hello world") //=> "Hello World"

 capitalize("hELLO", true) //=> "Hello"
 
 capitalize("hELLO", false) //=> "HELLO"

NOTE: Optionally pass in boolean to convert following characters to lower case