An NPM Module that simplifies the task of converting strings to Title Case.
The convert-to-title-case
module is a versatile and user-friendly tool that ensures a consistent and aesthetically pleasing Title Case presentation for diverse input text styles.
-
Lowercase:
- input:
this is a sample text
- output:
This Is A Sample Text
- input:
-
Uppercase:
- input:
ALL CAPS HERE
- output:
All Caps Here
- input:
-
Mixed Case:
- input:
miXeD CaSe ExAmPlE
- output:
Mixed Case Example
- input:
This project uses Node.js and npm. Go check them out if you don't have them locally installed.
node --version
npm --version
Use the package manager npm to install convert-to-title-case.
npm i convert-to-title-case
Using JavaScript's require function.
const toTitleCase = require('convert-to-title-case');
Here's an simple example of how to use the module.
const toTitleCase = require("convert-to-title-case");
// Import the function
const inputString = "hello world"; // Input string
const titleCasedString = toTitleCase(inputString); // Call the function and pass the input string
console.log(`Original: ${inputString}`); // Output: hello world
console.log(`Title Case: ${titleCasedString}`); // Output: Hello World
Contributions are always welcome!
Distributed under the MIT License. See LICENSE
for more information.
- Website: DesiScript.com
- Facebook: Desi Script
- Twitter: @ShadmanHere
- LinkedIn: @ShadmanHere
Use this section to mention useful resources and libraries that you have used in your projects.