docs: function addHookFn (proto, name) {
    proto[name] = function () {
      var args = [].splice.call(arguments, 0);
  
      var fn = args.splice(args.length - 1)[0];
      fn = _.isFunction(fn) ? fn : undefined;
  
      var options = {};
      if (_.isPlainObject(args[args.length - 1])) {
        options = args.splice(args.length - 1)[0];
      }
  
      var self = this;
      _.each(args, function(arg) {
        var event = util.format('%s.%s.%s.%s', name, self.name, self.version, arg);
        // remove old listeners if redefine is true
        if (options.redefine) {
          debug('Redefine hook', event);
          self.removeAllListeners(event);
        }
        self.on(event, fn);
      });
    };
  }