ts-ucfirst
v1.0.6
Published
Ucfirst, but with typescript
Downloads
209
Maintainers
Readme
ts-ucfirst
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'