just-capitalize
Version:
capitalize the first character of a string
30 lines (22 loc) • 747 B
Markdown
<!-- DO NOT EDIT THIS FILE! THIS FILE WAS AUTOGENERATED BY TEMPLATE-MATE -->
<!-- SEE https://github.com/angus-c/just/blob/master/CONTRIBUTING.md#readme-template -->
## just-capitalize
Part of a [library](https://anguscroll.com/just) of zero-dependency npm modules that do just do one thing.
Guilt-free utilities for every occasion.
[`🍦 Try it`](https://anguscroll.com/just/just-capitalize)
```shell
npm install just-capitalize
```
```shell
yarn add just-capitalize
```
Capitalize the first character of a string
```js
import capitalize from 'just-capitalize';
/*
capitalize('capitals'); // 'Capitals'
capitalize('Capitals'); // 'Capitals'
capitalize('many words'); // 'Many words'
capitalize('!exclaim'); // '!exclaim'
*/
```