2 lightweight helper functions to do 'helloWORLD' → 'Helloworld'
or 'helloWORLD' → 'HelloWORLD'
.
npm install --save capitalize-lightweight
Or via Yarn:
yarn add capitalize-lightweight
import { capitalize, capitalizeExtra } from "capitalize-lightweight";
const s1 = capitalize('helloWORLD');
console.log(s1); // => 'HelloWORLD'
const s2 = capitalizeExtra('helloWORLD');
console.log(s2); // => 'Helloworld'
You don't ofc. I wanted mine. Feel free to re-use it.