Wondering what’s next for npm?Check out our public roadmap! »

title-caser

1.0.6 • Public • Published

Title-caser

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

Install

npm i title-caser

DownloadsWeekly Downloads

8

Version

1.0.6

License

MIT

Unpacked Size

3.69 kB

Total Files

7

Last publish

Collaborators

  • avatar