Skip to content

Initial Words

initialWords is a function capitalize and get the first letter of each word in a string.

Example

This function will take the first letter of each word and convert to uppercase:

ts
import { initialWords } from "@titocandradev/neatcore";

const result = initialWords("hello world");
// "H W"