feature(util) add execOnMatch

This commit is contained in:
coderaiser 2014-03-15 13:46:45 -04:00
parent b9f8f9589d
commit 38934de406

View file

@ -823,6 +823,19 @@
return ret;
};
this.execOnMatch = function(exp, funcsObj) {
var name, func, match;
if (funcsObj)
for (name in funcsObj) {
match = name.match(new RegExp(exp));
func = funcsObj[name];
if (isMatch)
Util.exec(func, match);
}
};
/**
* exec function if it exist in object
* @pArg