Lodash - toLower method


Advertisements

Syntax

_.toLower([string=''])

Converts string, as a whole, to lower case just like String#toLowerCase.

Arguments

  • [string=''] (string) − The string to convert.

Output

  • (string) − Returns the lower cased string.

Example

var _ = require('lodash');
var result = _.toLower('fooBar');

console.log(result);

Save the above program in tester.js. Run the following command to execute this program.

Command

\>node tester.js

Output

foobar
lodash_string.htm
Advertisements