npm.io
1.0.6 • Published 3 years ago

ts-ucfirst

Licence
ISC
Version
1.0.6
Deps
0
Size
25 kB
Vulns
0
Weekly
0

ts-ucfirst npm Version workflow

Uppercase first character of a string in case you are too lazy to do it yourself

Example:

const ucfirst = require("ts-ucfirst");
ucfirst('hello world'); // 'Hello world'

Example to capitalize each word of a sentence:

const ucfirst = require("ts-ucfirst");
const sentence = "sentence to be all capitalized"
sentence.split(' ').map(ucfirst).join(' '); // 'Sentence To Be All Capitalized'  

Keywords