lib/camp.js
function genericUnit (server) {
  var processors = [];
  server.handler = function (f) { processors.push(f); };
  return function genericLayer (req, res, next) {
    for (var i = 0; i < processors.length; i++) {
      var keep = processors[i](req.ask);
      if (keep) { return; }  // Don't call next, nor the rest.
    }
    next();  // We never catch that request.
  };
}
function genericUnit (server) {
  var processors = [];
  server.handler = function (f) { processors.push(f); };
  return function genericLayer (req, res, next) {
    for (var i = 0; i < processors.length; i++) {
      var keep = processors[i](req.ask);
      if (keep) { return; }  // Don't call next, nor the rest.
    }
    next();  // We never catch that request.
  };
}
function genericUnit ( server ) { var processors = [ ] ; server . handler = function ( f ) { processors . push ( f ) ; } ; return function genericLayer ( req , res , next ) { for ( var i = 0 ; i < processors . length ; i ++ ) { var keep = processors [ i ] ( req . ask ) ; if ( keep ) { return ; } // Don't call next, nor the rest. } next ( ) ; // We never catch that request. } ; }
Generic unit. Deprecated.
Generic unit . Deprecated .