Skip to main content

titleCase

Formats the given string in title case fashion

API

function titleCase(str: string | null | undefined): string;

Usage

import { titleCase } from '@feedzai/js-utilities';

titleCase('hello world')
//-> 'Hello World'

titleCase('va_va_boom')
//-> 'Va Va Boom'

titleCase('root-hook')
//-> 'Root Hook'

titleCase('queryItems')
//-> 'Query Items'