code: function en(schema, defaults, options) {
    if (kindOf(schema) !== 'array') {
      if (process.env.NODE_ENV !== 'production') {
        throw new Error(
          `Enum structs must be defined as an array, but you passed: ${schema}`
        )
      } else {
        throw new Error(`Invalid schema: ${schema}`)
      }
    }
  
    const name = 'enum'
    const type = schema
      .map(s => {
        try {
          return JSON.stringify(s)
        } catch (e) {
          return String(s)
        }
      })
      .join(' | ')
  
    const validate = (value = resolveDefaults(defaults)) => {
      return schema.includes(value)
        ? [undefined, value]
        : [{ data: value, path: [], value, type }]
    }
  
    return new Kind(name, type, validate)
  }
docs: Enum.
  
  @param {Array} schema
  @param {Any} defaults
  @param {Object} options