Convert any string text to title-case using this package Search on NPM or just use the link: Title-caser
To install the Title-caser package run the code below in your terminal
npm i title-caser
const TitleCaser = require('title-caser')
TitleCaser.titleCase('my name is elvis onobo')
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')
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)
MNI
You are welcome to improve the package. Be sure to add testing as appropriate. The package uses Jest for testing.
MIT