• Validates an options object against a map of validators and defaults.

    If input is null, undefined, or not an object the defaults are returned (with a warning for non-nullish non-objects).

    Supports special validator types created by:

    • validatorOf: recursively validates nested objects
    • arrayOf: validates arrays with per-item validation
    • anyOf: accepts the first matching validator from a list
    • recordOf: validates objects with dynamic keys

    Parameters

    • input: unknown
    • validatorMap: Record<string, TypeValidator>
    • defaults: Record<string, unknown>
    • Optional logger: LDLogger
      Optional
    • Optional prefix: string
      Optional

    Returns Record<string, unknown>

Generated using TypeDoc