if you are ready to use JS pattern, you can do this in following way:

var myClass = function(opts) {
          return function(){
            this.config = opts.config;
            this.method = opts.method;
            return this.method.apply(this, arguments);
          };
        };


var execCustom = new myClass({
        config:{ wait: 100 }, 
        method:function() {
            console.log("called method with "+arguments.length+" argument(s):");
            for(var a in arguments) console.log(arguments[a]);
            return true;
        }});

execCustom("someval","other");


jsbin

this is the best way I can think of

UPDATED VERSION (by op)

var myClass = function(opts) {
      var x = function(){
          return x.method.apply(x, arguments);
      };
      x.config = opts.config;
      x.method = opts.method;
      return x; 
    };


var execCustom = new myClass({
    config:{ wait: 100 }, 
    method:function() {
        console.log("called method with "+arguments.length+" argument(s):");
        for(var a in arguments) console.log(arguments[a]);
        return true;
    }});

execCustom("someval","other");


jsbin

JavaScript Equivalent Of PHP __invoke
Assume having a fair octahedron. We throw it $93$ times and get the following results:
$\{33;7;8;1;2;0;5;37\}$

The numbers represent how many times the die fell on side $1, 2,...., 8$.
What is the probability we got such a result?
