Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

capitalize-lightweight

maks-io9MIT1.0.2TypeScript support: included

2 lightweight helper functions to do 'helloWORLD' → 'Helloworld' or 'helloWORLD' → 'HelloWORLD'.

capitalize, string, strings, uppercase, lowercase

readme

google-sheets-logo

Version

2 lightweight helper functions to do 'helloWORLD' → 'Helloworld' or 'helloWORLD' → 'HelloWORLD'.

Install

npm install --save capitalize-lightweight

Or via Yarn:

yarn add capitalize-lightweight

Usage

import { capitalize, capitalizeExtra } from "capitalize-lightweight";

const s1 = capitalize('helloWORLD');
console.log(s1); // => 'HelloWORLD'

const s2 = capitalizeExtra('helloWORLD');
console.log(s2); // => 'Helloworld'

"wHy dO i NEeD A LiBrary FOr that?!"

You don't ofc. I wanted mine. Feel free to re-use it.