typia
Version:
Superfast runtime validators with only one line
13 lines (12 loc) • 320 B
JavaScript
//#region src/internal/_httpHeaderReadBigint.ts
const _httpHeaderReadBigint = (value) => value !== void 0 ? toBigint(value) : void 0;
const toBigint = (str) => {
try {
return BigInt(str);
} catch {
return str;
}
};
//#endregion
export { _httpHeaderReadBigint };
//# sourceMappingURL=_httpHeaderReadBigint.mjs.map