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