mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 00:27:50 +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.
|
||||
*/
|
||||
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)) {
|
||||
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) {
|
||||
methodNames = lodashMethods.slice();
|
||||
|
||||
Reference in New Issue
Block a user