UNPKG

voca

Version:

The ultimate JavaScript string library

30 lines (25 loc) 661 B
'use strict'; require('./internal/is_nil.js'); require('./is_string.js'); var coerce_to_string = require('./internal/coerce_to_string.js'); /** * Converts the `subject` to lower case. * * @function lowerCase * @static * @since 1.0.0 * @memberOf Case * @param {string} [subject=''] The string to convert to lower case. * @return {string} Returns the lower case string. * @example * v.lowerCase('Green'); * // => 'green' * * v.lowerCase('BLUE'); * // => 'blue' */ function lowerCase(subject) { var subjectString = coerce_to_string.coerceToString(subject, ''); return subjectString.toLowerCase(); } module.exports = lowerCase;