https://github.com/maks-io/capitalize-lightweight
2 lightweight helper functions to do 'helloWORLD' → 'Helloworld' or 'helloWORLD' → 'HelloWORLD'.
https://github.com/maks-io/capitalize-lightweight
capitalize lowercase string strings uppercase
Last synced: 5 months ago
JSON representation
2 lightweight helper functions to do 'helloWORLD' → 'Helloworld' or 'helloWORLD' → 'HelloWORLD'.
- Host: GitHub
- URL: https://github.com/maks-io/capitalize-lightweight
- Owner: maks-io
- License: mit
- Created: 2023-05-22T17:01:21.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-26T10:08:52.000Z (over 1 year ago)
- Last Synced: 2025-04-27T10:18:13.975Z (5 months ago)
- Topics: capitalize, lowercase, string, strings, uppercase
- Language: TypeScript
- Homepage:
- Size: 161 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.npmjs.com/package/capitalize-lightweight)
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
```typescript
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.