Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

lowerCase.js 622B

123456789101112131415161718192021222324252627
  1. var createCompounder = require('./_createCompounder');
  2. /**
  3. * Converts `string`, as space separated words, to lower case.
  4. *
  5. * @static
  6. * @memberOf _
  7. * @since 4.0.0
  8. * @category String
  9. * @param {string} [string=''] The string to convert.
  10. * @returns {string} Returns the lower cased string.
  11. * @example
  12. *
  13. * _.lowerCase('--Foo-Bar--');
  14. * // => 'foo bar'
  15. *
  16. * _.lowerCase('fooBar');
  17. * // => 'foo bar'
  18. *
  19. * _.lowerCase('__FOO_BAR__');
  20. * // => 'foo bar'
  21. */
  22. var lowerCase = createCompounder(function(result, word, index) {
  23. return result + (index ? ' ' : '') + word.toLowerCase();
  24. });
  25. module.exports = lowerCase;