Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

upperCase.js 620B

123456789101112131415161718192021222324252627
  1. var createCompounder = require('./_createCompounder');
  2. /**
  3. * Converts `string`, as space separated words, to upper 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 upper cased string.
  11. * @example
  12. *
  13. * _.upperCase('--foo-bar');
  14. * // => 'FOO BAR'
  15. *
  16. * _.upperCase('fooBar');
  17. * // => 'FOO BAR'
  18. *
  19. * _.upperCase('__foo_bar__');
  20. * // => 'FOO BAR'
  21. */
  22. var upperCase = createCompounder(function(result, word, index) {
  23. return result + (index ? ' ' : '') + word.toUpperCase();
  24. });
  25. module.exports = upperCase;