code: function any(schema, defaults, options) {
    if (isStruct(schema)) {
      return schema[KIND]
    }
  
    if (schema instanceof Kind) {
      return schema
    }
  
    switch (kindOf(schema)) {
      case 'array': {
        return schema.length > 1
          ? tuple(schema, defaults, options)
          : list(schema, defaults, options)
      }
  
      case 'function': {
        return func(schema, defaults, options)
      }
  
      case 'object': {
        return object(schema, defaults, options)
      }
  
      case 'string': {
        let required = true
        let type
  
        if (schema.endsWith('?')) {
          required = false
          schema = schema.slice(0, -1)
        }
  
        if (schema.includes('|')) {
          const scalars = schema.split(/\s*\|\s*/g)
          type = union(scalars, defaults, options)
        } else if (schema.includes('&')) {
          const scalars = schema.split(/\s*&\s*/g)
          type = intersection(scalars, defaults, options)
        } else {
          type = scalar(schema, defaults, options)
        }
  
        if (!required) {
          type = optional(type, undefined, options)
        }
  
        return type
      }
    }
  
    if (process.env.NODE_ENV !== 'production') {
      throw new Error(
        `A schema definition must be an object, array, string or function, but you passed: ${schema}`
      )
    } else {
      throw new Error(`Invalid schema: ${schema}`)
    }
  }
docs: Any.
  
  @param {Array|Function|Object|String} schema
  @param {Any} defaults
  @param {Object} options