src/hmac-validator.js
function checkConfig(config) {
  let requiredProps = ['algorithm', 'format'];
  const errMsg = `Configuration isn't an object with the required properties: ${requiredProps.join(', ')}`;

  if ((!config) || (typeof config !== 'object')) {
    throw new Error(errMsg);
  }

  requiredProps.forEach(p => {
    if (!config[p]) {
      throw new Error(errMsg);
    }
  });
}
function checkConfig(config) {
  let requiredProps = ['algorithm', 'format'];
  const errMsg = `Configuration isn't an object with the required properties: ${requiredProps.join(', ')}`;

  if ((!config) || (typeof config !== 'object')) {
    throw new Error(errMsg);
  }

  requiredProps.forEach(p => {
    if (!config[p]) {
      throw new Error(errMsg);
    }
  });
}
function checkConfig ( config ) { let requiredProps = [ 'algorithm' , 'format' ] ; const errMsg = ` ${ requiredProps . join ( ', ' ) } ` ; if ( ( ! config ) || ( typeof config !== 'object' ) ) { throw new Error ( errMsg ) ; } requiredProps . forEach ( p => { if ( ! config [ p ] ) { throw new Error ( errMsg ) ; } } ) ; }
Makes basic checks on Hmac validator configuration like required parameters.

@param {Object} config - The configuration used to create a new Hmac validator
@throws {Error} When one of the checks fails
Makes basic checks on Hmac validator configuration like required parameters .