feature(util) ifExist: args -> [args]

This commit is contained in:
coderaiser 2014-10-10 11:02:10 -04:00
parent c540036319
commit b17682fb6e

View file

@ -731,10 +731,8 @@
var ret,
func = obj && obj[name];
if (func) {
func = func.bind(obj);
ret = exec(func, arg);
}
if (func)
func = func.apply(obj, arg);
return ret;
};
@ -953,7 +951,7 @@
this.time = function(name) {
var console = Scope.console;
Util.exec.ifExist(console, 'time', name);
Util.exec.ifExist(console, 'time', [name]);
return this;
};
@ -965,7 +963,7 @@
this.timeEnd = function(name) {
var console = Scope.console;
Util.exec.ifExist(console, 'timeEnd', name);
Util.exec.ifExist(console, 'timeEnd', [name]);
return this;
};