Nice script, I can see myself using this often but as-is it would break when minified, given that you're serializing the function. A workaround could be the approach that Angular takes, passing an array with the arguments as strings so they don't get mangled after minifying. Maybe something like this? Just thinking out loud:
var f = Over(
['msg$string', function(msg) {
return ...;
}],
['msg$string, num$number', function(msg, num) {
return ...;
}]
);
Nice script, I can see myself using this often but as-is it would break when minified, given that you're serializing the function. A workaround could be the approach that Angular takes, passing an array with the arguments as strings so they don't get mangled after minifying. Maybe something like this? Just thinking out loud: