mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
refactor(cloudfunc) formatMsg
This commit is contained in:
parent
ae7e92e3ed
commit
54e25b2aba
1 changed files with 11 additions and 4 deletions
|
|
@ -140,10 +140,17 @@ var Util;
|
|||
return ret;
|
||||
};
|
||||
|
||||
this.formatMsg = function(pMsg, pName, pStatus) {
|
||||
var status = pStatus || 'ok',
|
||||
name = !pName ? '': '("' + pName + '")',
|
||||
msg = pMsg + ': ' + status + name;
|
||||
this.formatMsg = function(msg, name, status) {
|
||||
if (!status)
|
||||
status = 'ok';
|
||||
|
||||
if (name)
|
||||
name = '("' + name + '")';
|
||||
else
|
||||
name = '';
|
||||
|
||||
|
||||
msg = msg + ': ' + status + name;
|
||||
|
||||
return msg;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue