docs: function assertMeetsSpec(spec, value, name, description) {
    if (!value) {
      throw new Error(
          value + ' is not valid value for option ' + name + ': ' + description);
    } else if (!underscore.isObject(value)) {
      throw new Error(
          '<' + value + '> is not an Object map, ' + name + ': ' + description);
    }
  
    // Don't allow unrecognized options.
    for (var givenOption in value) {
      if (!spec[givenOption]) {
        throw new Error('Unrecognized option <' + givenOption + '> within '
            + name);
      }
    }
  
    // Validate each spec option.
    for (var option in spec) {
      if (spec[option].required && !value.hasOwnProperty(option)) {
        throw new Error('Missing required option ' + option + ' within ' + name);
      }
  
      if (value.hasOwnProperty(option)) {
        spec[option].validatorFn(value[option], name + '[\'' + option + '\']',
            spec[option].description);
      } else if (spec[option].hasOwnProperty('defaultValue')) {
        // Populate default value if available and no value was given.
        value[option] = spec[option].defaultValue;
      }
    }
  }