1 | /**
|
2 | * Convert string into de-capitalized case.
|
3 | * First letters will be lowercase.
|
4 | * @memberof module:stringcase/lib
|
5 | * @function decapitalcase
|
6 | * @param {string} str - String to convert.
|
7 | * @returns {string} Capital case string.
|
8 | */
|
9 |
|
10 |
|
11 |
|
12 | const lowercase = require('./lowercase')
|
13 |
|
14 | /** @lends capitalcase */
|
15 | function capitalcase (str) {
|
16 | str = String(str)
|
17 | if (!str) {
|
18 | return str
|
19 | }
|
20 | return lowercase(str[ 0 ]) + str.slice(1)
|
21 | }
|
22 |
|
23 | module.exports = capitalcase
|