fix(client) route: strBigFirst -> kebabToCamelCase

This commit is contained in:
coderaiser 2017-03-24 16:03:15 +02:00
parent 2e4c1dfe4d
commit 8249756bcf
2 changed files with 6 additions and 9 deletions

View file

@ -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);

View file

@ -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);
}