Files
Epicnabbo-Catalogus-Updated…/src/lib/form-data.ts
T
2026-07-13 21:57:41 +02:00

10 lines
248 B
TypeScript

import { positiveBigInt } from "@/lib/api";
export function formPositiveBigInt(
formData: FormData,
field: string,
): bigint | null {
const value = formData.get(field);
return typeof value === "string" ? positiveBigInt(value.trim()) : null;
}