Skip to content

capitalize

Yousif Al-Raheem edited this page Dec 23, 2019 · 2 revisions

Capitalize as the name implies takes a word/string and convert it to a PascalCase equivalent by capitalising the first alphabet.

Example

const word = "pascalCase";
const result = capitalize(word);
console.log(result); // Output: PascalCase

Properties

Param Type Description
word string The word you want to convert to a PascalCase string
Clone this wiki locally