@launchdarkly/js-client-sdk-common - v1.35.0
    Preparing search index...

    Function validateOptions

    • 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>
      • Optionallogger: LDLogger
      • Optionalprefix: string

      Returns Record<string, unknown>