diff --git a/lib/util.js b/lib/util.js index 1d27d92b..2904ee2e 100644 --- a/lib/util.js +++ b/lib/util.js @@ -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