code: function validateString(context, name, def, map) {
    var value = context[name]
  
    if (value == null) {
      value = def
    }
  
    value = String(value)
  
    if (!(value in map)) {
      raise(value, 'options.' + name)
    }
  
    context[name] = value
  }
docs: Validate a value to be in `map`. Defaults to `def`.  Raises an exception with `context[name]` when not in `map`.