unique-username-generator
unique-username-generator copied to clipboard
capitalize option capitalizes only first word
trafficstars
The capital option will capitalize each word of the unique username generated
According to docs it's mentioned each word will get capitalized, but in use only the first word gets capitalized.
you just need to make your own utility
export function capitalize(str: string) {
return str.charAt(0).toUpperCase() + str.slice(1);
}
example usage
const username = capitalize(generateUsername())
console.log(username);
// Blossomlogistical
@Sisableng Yes, but the doc incorrectly says all words are capitalized.