convert-to-title-case
v1.0.6
Published
Converts to title case
Downloads
6
Readme
An NPM Module that simplifies the task of converting strings to Title Case.
:star2: About the Project
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.
:pen: Supported Cases and Examples
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:
:toolbox: Getting Started
:bangbang: Prerequisites
This project uses Node.js and npm. Go check them out if you don't have them locally installed.
node --version
npm --version
:gear: Installation
Use the package manager npm to install convert-to-title-case.
npm i convert-to-title-case
:running: Import Module
Using JavaScript's require function.
const toTitleCase = require('convert-to-title-case');
:eyes: Usage
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
:wave: Contributing
Contributions are always welcome!
:warning: License
Distributed under the MIT License. See LICENSE
for more information.
:handshake: Contact
- Website: DesiScript.com
- Facebook: Desi Script
- Twitter: @ShadmanHere
- LinkedIn: @ShadmanHere
:gem: Acknowledgements
Use this section to mention useful resources and libraries that you have used in your projects.