mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 19:07:49 +00:00
Minor formatting nits.
This commit is contained in:
@@ -10,9 +10,7 @@ import unicodeSize from './.internal/unicodeSize.js';
|
|||||||
* @returns {number} Returns the string size.
|
* @returns {number} Returns the string size.
|
||||||
*/
|
*/
|
||||||
function stringSize(string) {
|
function stringSize(string) {
|
||||||
return hasUnicode(string)
|
return hasUnicode(string) ? unicodeSize(string) : asciiSize(string);
|
||||||
? unicodeSize(string)
|
|
||||||
: asciiSize(string);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default stringSize;
|
export default stringSize;
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ import createCompounder from './.internal/createCompounder.js';
|
|||||||
* kebabCase('__FOO_BAR__');
|
* kebabCase('__FOO_BAR__');
|
||||||
* // => 'foo-bar'
|
* // => 'foo-bar'
|
||||||
*/
|
*/
|
||||||
const kebabCase = createCompounder((result, word, index) => result + (index ? '-' : '') + word.toLowerCase());
|
const kebabCase = createCompounder((result, word, index) =>
|
||||||
|
result + (index ? '-' : '') + word.toLowerCase()
|
||||||
|
);
|
||||||
|
|
||||||
export default kebabCase;
|
export default kebabCase;
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ import createCompounder from './.internal/createCompounder.js';
|
|||||||
* lowerCase('__FOO_BAR__');
|
* lowerCase('__FOO_BAR__');
|
||||||
* // => 'foo bar'
|
* // => 'foo bar'
|
||||||
*/
|
*/
|
||||||
const lowerCase = createCompounder((result, word, index) => result + (index ? ' ' : '') + word.toLowerCase());
|
const lowerCase = createCompounder((result, word, index) =>
|
||||||
|
result + (index ? ' ' : '') + word.toLowerCase()
|
||||||
|
);
|
||||||
|
|
||||||
export default lowerCase;
|
export default lowerCase;
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ import upperFirst from './upperFirst.js';
|
|||||||
* startCase('__FOO_BAR__');
|
* startCase('__FOO_BAR__');
|
||||||
* // => 'FOO BAR'
|
* // => 'FOO BAR'
|
||||||
*/
|
*/
|
||||||
const startCase = createCompounder((result, word, index) => result + (index ? ' ' : '') + upperFirst(word));
|
const startCase = createCompounder((result, word, index) =>
|
||||||
|
result + (index ? ' ' : '') + upperFirst(word)
|
||||||
|
);
|
||||||
|
|
||||||
export default startCase;
|
export default startCase;
|
||||||
|
|||||||
Reference in New Issue
Block a user