diff --git a/client/client.js b/client/client.js index ec3bac2b..3ebf89af 100644 --- a/client/client.js +++ b/client/client.js @@ -56,16 +56,15 @@ function CloudCmdProto(Util, DOM) { right: 'asc', }; - log.enable = function() { + log.enable = () => { Debug = true; }; - log.disable = function() { + log.disable = () => { Debug = false; }; - var getStrBigFirst = Util.getStrBigFirst; - var kebabToCamelCase = Util.kebabToCamelCase; + const kebabToCamelCase = Util.kebabToCamelCase; /** * Функция привязываеться ко всем ссылкам и @@ -238,10 +237,8 @@ function CloudCmdProto(Util, DOM) { if (!path) return; - let [module] = query; - - module = module.slice(1); - module = getStrBigFirst(module); + const [kebabModule] = query; + const module = kebabToCamelCase(kebabModule.slice(1)); const file = query[1]; const current = DOM.getCurrentByName(file); diff --git a/common/util.js b/common/util.js index 4af3d0b7..580821e2 100644 --- a/common/util.js +++ b/common/util.js @@ -185,7 +185,7 @@ function UtilProto(exec) { if (!str) throw Error('str could not be empty!'); - var first = str[0].toUpperCase(); + const first = str[0].toUpperCase(); return first + str.slice(1); }