TitleCaseIt

Convert your title and headings into Title Case.

Writing content is an art. We have all heard about the Content is King! but it’s way too easy to the loose sight of better readability. Turn your content’s titles and headings into the Title Case with TitleCaseIt.

Check out the live site →

Version 2.0

TitleCaseIt-Pink-Live-V2

Version 1.x

TitleCaseIt Live

TitleCaseIt

npm

Convert any text to title case.

TitleCaseIt

Web App

Use the free web tool at TitleCaseIt.AhmadAwais.com

Install

npm install @ahmadawais/titlecaseit

Usage

Node.js (CommonJS)

const titleCaseIt = require('@ahmadawais/titlecaseit');

titleCaseIt('the quick brown fox');
//=> 'The Quick Brown Fox'

titleCaseIt('a tale of two cities');
//=> 'A Tale of Two Cities'

Node.js (ESM)

import titleCaseIt from '@ahmadawais/titlecaseit';

titleCaseIt('the quick brown fox');
//=> 'The Quick Brown Fox'

How It Works

Words like a, an, the, and, but, or, for, nor, on, at, to, by, in, of, per, vs, via, en, as, if are kept lowercase unless they are the first or last word. Words with internal capitals (like iPhone) or dots (like U.S.A.) are left unchanged.

Changelog

Read the CHANGELOG.md for details.

License

GPL-2.0 (C) Ahmad Awais

Ahmad Awais

I am a Full Stack WordPress Developer, WP Core Contributor, Front-end Fanatic , a Designer by night, and an accidental writer. I love to create optimized but advanced workflows to produce professionally built Open Source software.

Leave a thought