just-capitalize
v3.2.0
Published
capitalize the first character of a string
Downloads
26,296
Maintainers
Readme
just-capitalize
Part of a library of zero-dependency npm modules that do just do one thing. Guilt-free utilities for every occasion.
npm install just-capitalize
yarn add just-capitalize
Capitalize the first character of a string
import capitalize from 'just-capitalize';
/*
capitalize('capitals'); // 'Capitals'
capitalize('Capitals'); // 'Capitals'
capitalize('many words'); // 'Many words'
capitalize('!exclaim'); // '!exclaim'
*/