node-dextrin - v0.1.0
    Preparing search index...

    Function materialize

    • Validates and materializes fields against compiled, using materializer if given. On success, the result is wrapped in a Validated (name: compiled.name) — internal bookkeeping so an outer schema's {form: 'reference', name} field can verify this value's origin even after materialization; callers that aren't another schema check must call Validated.strip on the final result.

      Parameters

      • compiled: Compiled
      • fields:
            | { pairs: [string, unknown][]; type: "keyed" }
            | { type: "positional"; values: unknown[] }
      • materializer: ((resolved: { [k: string]: unknown }) => unknown) | null
      • registry: export=

      Returns Validated