text-capital-case
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Capital Case

NPM version NPM downloads Bundle size

Transform into a space separated text with each word capitalized.

Installation

npm install text-capital-case --save

Usage

import { capitalCase } from "text-capital-case";
 
capitalCase("string"); //=> "String"
capitalCase("dot.case"); //=> "Dot Case"
capitalCase("PascalCase"); //=> "Pascal Case"
capitalCase("camelCase"); //=> "Camel Case"
capitalCase("version 1.2.3"); //=> "Version 1 2 3"

The function also accepts options.

License

MIT

Package Sidebar

Install

npm i text-capital-case

Weekly Downloads

2,287

Version

1.0.2

License

MIT

Unpacked Size

6.66 kB

Total Files

7

Last publish

Collaborators

  • dimetrix