vanillajs-helpers

Collection of convenience code snippets (helpers) that aims to make it a little easier to work with vanilla JS

View the Project on GitHub Tokimon/vanillajs-helpers

vanillajs-helpers > “capitalize”

External module: “capitalize”

Index

Functions


Functions

capitalize

capitalize(str: string): string

Defined in capitalize.ts:12

Capitalize each word in a phrase

capitalize('capitalize this phrase'); // -> Capitalize This Phrase
capitalize('capitalize-This-phrase'); // -> Capitalize-This-Phrase

Parameters:

Param Type Description
str string String to capitalize

Returns: string