UNPKG

typia

Version:

Superfast runtime validators with only one line

11 lines (9 loc) 242 B
export const _httpHeaderReadBigint = (value: string | undefined) => value !== undefined ? toBigint(value) : undefined; const toBigint = (str: string): bigint | string => { try { return BigInt(str); } catch { return str; } };