function parseDayPrices
parseDayPrices(raw: unknown): DayPrices

Coerce an arbitrary stored/parsed value into a clean DayPrices map. Keeps only whole-number day counts in [1, MAX_DURATION_DAYS] mapped to finite, non-negative whole-number minor-unit prices; everything else is dropped. Used on both the DB read path and form parsing so the rest of the code can treat the map as already-valid.

Parameters

raw: unknown

Return Type

Usage

import { parseDayPrices } from "docs/config.ts";