UNPKG
foop
Version:
beta (5.0.0)
latest (5.0.0)
5.0.0
interfaces that describe their intentions.
github.com/fluents/chain-able
fluents/chain-able
foop
/
deps
/
string
/
firstToUpperCase.js
10 lines
(9 loc)
•
273 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
/** *
@name
firstToUpperCase *
@since
2.0.0 *
@memberOf
string *
@param
{string} str take first char to uppercase *
@return
{string} str with uc first *
@example
firstToUpperCase('eh') //=> 'Eh' */
module
.
exports
= str => str.charAt(
0
).toUpperCase() + str.slice(
1
)