141ef178d53f6e4286afab48e7cfa3ff28f64447
[yaffs-website] / node_modules / uncss / node_modules / lodash / upperCase.js
1 var createCompounder = require('./internal/createCompounder');
2
3 /**
4  * Converts `string`, as space separated words, to upper case.
5  *
6  * @static
7  * @memberOf _
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
26 module.exports = upperCase;