index.js
function req (params, spec, errs) {
  for (var key in spec) {
    if (spec[key].req && !params.hasOwnProperty(key)) reqError(key, errs)
  }
}
function req (params, spec, errs) {
  for (var key in spec) {
    if (spec[key].req && !params.hasOwnProperty(key)) reqError(key, errs)
  }
}
function req ( params , spec , errs ) { for ( var key in spec ) { if ( spec [ key ] . req && ! params . hasOwnProperty ( key ) ) reqError ( key , errs ) } }
Ensure that required keys are set.

@param {Object} params
Parameters value object.

@param {String} spec
Parameters definition object.

@param {Array} errs
Errors list.
Ensure that required keys are set .