code: function middlewareRegister(type) {
    Spider.prototype[type] = function(fn) {
  
      // Guard
      if (typeof fn !== 'function')
        throw Error('sandcrawler.spider.' + type + ': given argument is not a function');
  
      this.middlewares[type].push(fn.bind(this));
      return this;
    };
  }
docs: Registering middlewares