Skip to content

title

Formats the given string in title case fashion

ParameterTypeRequiredDescription
strstringYesThe string to format
ReturnsstringYesThe formatted string
ts
import { title } from 'func-dash'
console.log(title('hello world')) // Hello World
console.log(title(undefined)) // ""