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