main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
618 bytes
|
Line | |
---|
1 | import createCompounder from './_createCompounder.js';
|
---|
2 |
|
---|
3 | /**
|
---|
4 | * Converts `string`, as space separated words, to upper case.
|
---|
5 | *
|
---|
6 | * @static
|
---|
7 | * @memberOf _
|
---|
8 | * @since 4.0.0
|
---|
9 | * @category String
|
---|
10 | * @param {string} [string=''] The string to convert.
|
---|
11 | * @returns {string} Returns the upper cased string.
|
---|
12 | * @example
|
---|
13 | *
|
---|
14 | * _.upperCase('--foo-bar');
|
---|
15 | * // => 'FOO BAR'
|
---|
16 | *
|
---|
17 | * _.upperCase('fooBar');
|
---|
18 | * // => 'FOO BAR'
|
---|
19 | *
|
---|
20 | * _.upperCase('__foo_bar__');
|
---|
21 | * // => 'FOO BAR'
|
---|
22 | */
|
---|
23 | var upperCase = createCompounder(function(result, word, index) {
|
---|
24 | return result + (index ? ' ' : '') + word.toUpperCase();
|
---|
25 | });
|
---|
26 |
|
---|
27 | export default upperCase;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.