code: function wrap(fn) {
    return function () {
      var self = this, args = arguments;
      this.domain.run(function () {
        fn.apply(self, args);
      });
    };
  }
docs: execute function (fn) in domain wrapper use it only on public functions