rest-vir - v2.2.0
    Preparing search index...

    Function extractSearchParams

    • Walk the supplied search params, validate each one against its requirement (if any), and produce a record suitable for both URL building (client) and request validation (server).

      The form of each output value matches its requirement:

      • Shape whose runtimeType is a single string: output is a single string.
      • Shape whose runtimeType is string[]: output is an array of strings.
      • Shape with a union runtime type: output preserves the form that satisfies the shape.
      • RegExp: output is a single string.
      • RegExp[]: output is an array of strings. Each value must match at least one of the supplied regexes.
      • No requirement: output preserves the supplied form (single or array), stringified.

      Non-string primitives are coerced with String(...) so that URL builders can accept numbers and booleans even when the shape is string-typed.

      Parameters

      Returns BaseSearchParams