lib/option-validator.js
function assertObjectMapOf(valueValidatorFn, value, name, description) {
  if (!underscore.isObject(value)) {
    throw new Error(
        '<' + value + '> is not an Object map, ' + name + ': ' + description);
  }

  // Check all values.
  for (var key in value) {
    valueValidatorFn(value[key], name + '[\'' + key + '\']', description);
  }
}
function assertObjectMapOf(valueValidatorFn, value, name, description) {
  if (!underscore.isObject(value)) {
    throw new Error(
        '<' + value + '> is not an Object map, ' + name + ': ' + description);
  }

  // Check all values.
  for (var key in value) {
    valueValidatorFn(value[key], name + '[\'' + key + '\']', description);
  }
}
function assertObjectMapOf ( valueValidatorFn , value , name , description ) { if ( ! underscore . isObject ( value ) ) { throw new Error ( '<' + value + '> is not an Object map, ' + name + ': ' + description ) ; } // Check all values. for ( var key in value ) { valueValidatorFn ( value [ key ] , name + '[\'' + key + '\']' , description ) ; } }
Throws an Error if value isn't an Object, and invokes elementValidatorFn for
each value within the map.
@param {function(*, string, string)} valueValidatorFn
@param {*} value
@param {string} name The option name.
@param {string} description Description of the option.
Throws an Error if value isn t an Object and invokes elementValidatorFn for each value within the map .