repo.or.cz
/
ProtonMail-WebClient.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge branch 'feat/inda-383-daily-stat' into 'main'
[ProtonMail-WebClient.git]
/
packages
/
utils
/
capitalize.ts
blob
22cab71ef5c22d26988c6a0db0b6f5397d7df036
1
/**
2
* Capitalize the first letter in a string.
3
*/
4
export default function capitalize(str: string | undefined) {
5
if (str === undefined) {
6
return;
7
}
8
9
if (str === '') {
10
return str;
11
}
12
return str[0].toUpperCase() + str.slice(1);
13
}