refactor(cloudfunc) add format

This commit is contained in:
coderaiser 2013-09-23 09:54:11 +00:00
parent cf0059fa2e
commit aa0d7ffa26
4 changed files with 19 additions and 16 deletions

View file

@ -41,6 +41,12 @@ var Util, exports, CloudFunc = {};
CloudFunc.LEFTPANEL = 'left';
CloudFunc.RIGHTPANEL = 'right';
CloudFunc.formatMsg = function(pMsg, pName, pStatus) {
var status = pStatus || 'ok';
msg = pMsg + ': ' + status + '("' + pName + '")';
return msg;
};
/**
* Функция убирает последний слеш,
* если он - последний символ строки