1 |
3a515b92
|
cagy
|
var toString = require('./toString');
|
2 |
|
|
|
3 |
|
|
/**
|
4 |
|
|
* Converts `string`, as a whole, to lower case just like
|
5 |
|
|
* [String#toLowerCase](https://mdn.io/toLowerCase).
|
6 |
|
|
*
|
7 |
|
|
* @static
|
8 |
|
|
* @memberOf _
|
9 |
|
|
* @since 4.0.0
|
10 |
|
|
* @category String
|
11 |
|
|
* @param {string} [string=''] The string to convert.
|
12 |
|
|
* @returns {string} Returns the lower cased string.
|
13 |
|
|
* @example
|
14 |
|
|
*
|
15 |
|
|
* _.toLower('--Foo-Bar--');
|
16 |
|
|
* // => '--foo-bar--'
|
17 |
|
|
*
|
18 |
|
|
* _.toLower('fooBar');
|
19 |
|
|
* // => 'foobar'
|
20 |
|
|
*
|
21 |
|
|
* _.toLower('__FOO_BAR__');
|
22 |
|
|
* // => '__foo_bar__'
|
23 |
|
|
*/
|
24 |
|
|
function toLower(value) {
|
25 |
|
|
return toString(value).toLowerCase();
|
26 |
|
|
}
|
27 |
|
|
|
28 |
|
|
module.exports = toLower;
|