1.1.0 • Published 7 years ago

to-start-case v1.1.0

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

to-start-case CircleCI

Convert a string to Start Case for human display purposes.

Converts a string, including strings in camelCase or snake_case, into Start Case (a variant of Title Case where all words start with a capital letter). UNLIKE OTHER Start Case libraries, it keeps original single quote and hyphen in the word.

Here are some examples:

   'management_companies' -> 'Management Companies'
   'managementCompanies' -> 'Management Companies'
   `hell's kitchen` -> `Hell's Kitchen`
   `co-op` -> `Co-op`

Installation

npm install --save to-start-case

Usage

import toStartCase from 'to-start-case';

toStartCase('Mangement_companies'); // 'Management Companies'
toStartCase(`hell's kitchen`); // `Hell's Kitchen`