router.js
function(req, requiredParams) {
      // Find all missing parameters
      var missingParams = [];
      _.forEach(requiredParams, function(requiredParam) {
        if (
          Mixins.isNullOrUndefined(req.params && req.params[requiredParam]) &&
          Mixins.isNullOrUndefined(req.query && req.query[requiredParam]) &&
          Mixins.isNullOrUndefined(req.body && req.body[requiredParam])
        ) {
          missingParams.push(requiredParam);
        }
      });
      return missingParams;
    }
function(req, requiredParams) {
      // Find all missing parameters
      var missingParams = [];
      _.forEach(requiredParams, function(requiredParam) {
        if (
          Mixins.isNullOrUndefined(req.params && req.params[requiredParam]) &&
          Mixins.isNullOrUndefined(req.query && req.query[requiredParam]) &&
          Mixins.isNullOrUndefined(req.body && req.body[requiredParam])
        ) {
          missingParams.push(requiredParam);
        }
      });
      return missingParams;
    }
function ( req , requiredParams ) { // Find all missing parameters var missingParams = [ ] ; _ . forEach ( requiredParams , function ( requiredParam ) { if ( Mixins . isNullOrUndefined ( req . params && req . params [ requiredParam ] ) && Mixins . isNullOrUndefined ( req . query && req . query [ requiredParam ] ) && Mixins . isNullOrUndefined ( req . body && req . body [ requiredParam ] ) ) { missingParams . push ( requiredParam ) ; } } ) ; return missingParams ; }
Return a list of missing parameters that were required

@param {Object} req
@param {Array} requiredParams
@return {Array}
Return a list of missing parameters that were required