mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 19:07:49 +00:00
Make capitalize in test/test-build.js consistent with other areas.
Former-commit-id: 2a4b6a2f394e474af2c3ca9376ec0ac2580e9bb9
This commit is contained in:
@@ -334,7 +334,7 @@
|
|||||||
* @returns {String} Returns the capitalized string.
|
* @returns {String} Returns the capitalized string.
|
||||||
*/
|
*/
|
||||||
function capitalize(string) {
|
function capitalize(string) {
|
||||||
return string[0].toUpperCase() + string.toLowerCase().slice(1);
|
return string[0].toUpperCase() + string.slice(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1565,7 +1565,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (/\bcategory=/.test(command)) {
|
if (/\bcategory=/.test(command)) {
|
||||||
methodNames = (methodNames || []).concat(command.match(/\bcategory=(\S*)/)[1].split(/, */).map(capitalize));
|
methodNames = (methodNames || []).concat(command.match(/\bcategory=(\S*)/)[1].split(/, */).map(function(category) {
|
||||||
|
return capitalize(category.toLowerCase());
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
if (!methodNames) {
|
if (!methodNames) {
|
||||||
methodNames = lodashMethods.slice();
|
methodNames = lodashMethods.slice();
|
||||||
|
|||||||
Reference in New Issue
Block a user