Skip to content

Package to convert any string text to title-case or an acronym

Notifications You must be signed in to change notification settings

elvis-onobo/title-caser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Convert any string text to title-case using this package Search on NPM or just use the link: Title-caser

Installation

To install the Title-caser package run the code below in your terminal

npm i title-caser

Usage

const TitleCaser = require('title-caser')

TitleCaser.titleCase('my name is elvis onobo')

Output:

My Name Is Elvis Onobo

You can also use this package to create acronyms from strings on the fly. For example:

TitleCaser.acronym('my name is elvis onobo')

Output:

MNIEO

You can choose where you want to start and stop creating your acronym with optional parameter like so:

TitleCaser.acronym(string, start, stop)

TitleCaser.acronym('my name is elvis onobo', 0, 3)

Output:

MNI

Contribution

You are welcome to improve the package. Be sure to add testing as appropriate. The package uses Jest for testing.

Licence

MIT

About

Package to convert any string text to title-case or an acronym

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published