UNPKG

text-title-case

Version:

Convert a text into title case following English rules

34 lines (23 loc) 962 B
# Title Case [![NPM version][npm-image]][npm-url] [![NPM downloads][downloads-image]][downloads-url] [![Bundle size][bundlephobia-image]][bundlephobia-url] > Transform a text into [title case](https://en.wikipedia.org/wiki/Letter_case#Title_case) following English rules. ## Installation ``` npm install text-title-case --save ``` ## Usage ```js import { titleCase } from "text-title-case"; titleCase("string"); //=> "String" titleCase("follow step-by-step instructions"); //=> "Follow Step-by-Step Instructions" ``` ## License MIT [npm-image]: https://img.shields.io/npm/v/text-title-case.svg?style=flat [npm-url]: https://npmjs.org/package/text-title-case [downloads-image]: https://img.shields.io/npm/dm/text-title-case.svg?style=flat [downloads-url]: https://npmjs.org/package/text-title-case [bundlephobia-image]: https://img.shields.io/bundlephobia/minzip/text-title-case.svg [bundlephobia-url]: https://bundlephobia.com/result?p=text-title-case