code: function checkParams(params, reqParams) {
      if ( reqParams.length < 1 ) {
        return;
      }
  
      if ( (_.isEmpty(params) || !params) && (reqParams.length > 0) ) {
        throw new Error('Missing parameters: ' + reqParams.join(', '));
      }
  
      var paramsKeys = _.keys(params);
    
      _.each(reqParams, function(reqParam) {
        if ( paramsKeys.indexOf(reqParam) === -1 ) {
          throw new Error('Missing parameter: ' + reqParam);
        }
      });
    }
docs: Helper function that checks for the required params
  
  @param {object} params
  @param {array} reqParams -- required parameters