Open Source

TitleCaser

Convert headlines across AP, APA, Chicago, NYT, and Wikipedia styles with dictionary-backed names, brands, acronyms, quotes, and punctuation handling.

Try an Example Load sample titles that demonstrate common casing edge cases.

Before

After

Get started

Install the package, choose a build profile, then pass a style and optional runtime settings into the title casing engine.

Read Full Documentation

Install

npm install @danielhaim/titlecaser

Use the default full build for dictionary-assisted Wikipedia mode and broader entity detection.

Node Usage

import { TitleCaser } from '@danielhaim/titlecaser';

const tc = new TitleCaser({ style: 'ap' });

tc.toTitleCase('nodejs development on aws');

Browser Usage

<script src="./dist/full/titlecaser.amd.js"></script>

"the future of devops"
  .toTitleCase({ style: 'apa' });

Build Profiles

full lite

Import the lite build when bundle size matters, or the full build when dictionary-backed detection is more important.