mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
feature(util) retFunc: add any count of params
This commit is contained in:
parent
0b74d6cd22
commit
46be594356
1 changed files with 5 additions and 4 deletions
|
|
@ -707,12 +707,13 @@ Util = exports || {};
|
|||
|
||||
/**
|
||||
* return function wich exec function in params
|
||||
* @param pCallBack
|
||||
* @param pArg
|
||||
* @param arguments: callback, args
|
||||
*/
|
||||
Util.retFunc = function(pCallBack, pArg) {
|
||||
Util.retFunc = function() {
|
||||
var args = arguments;
|
||||
|
||||
return function() {
|
||||
return Util.exec(pCallBack, pArg);
|
||||
return Util.exec.apply(null, args);
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue