dont decapitalise all-caps operation names

This commit is contained in:
d98762625 2018-05-11 17:33:14 +01:00
parent 615cb561e4
commit 7e8f78acaa

View File

@ -134,5 +134,9 @@ export function help(operations, searchTerm) {
* @returns {String} decapitalised
*/
export function decapitalise(name) {
// Don't decapitalise names that are purely uppercase
if (/^[A-Z0-9]+$/g.test(name)) {
return name;
}
return `${name.charAt(0).toLowerCase()}${name.substr(1)}`;
}