Capitalize or Uncapitalize your selected letter in your string
npm install change-capitalizationModule Summary
The library change-capitalization is used to increase or decrease any letter of a string using an index.
---
How to import
Use this like in the example below:
import { toLowerCase, toUpperCase } if you are using both
import { toLowerCase } if you are using lowerCase version
import { toUpperCase } if you are using upperCase version
---
Explanation
toLowerCase(word)(letterIndex) => changedWord
INPUT PARAMS:
word: string
letterIndex: number
OUTPUT VALUE:
changedWord: string
---
Examples
console.log(toLowerCase("Hello World")(0)) // hello world
console.log(toUpperCase("Hello World")(10)) // Hello WorlD