typia
Version:
Superfast runtime validators with only one line
1 lines • 528 B
Source Map (JSON)
{"version":3,"file":"_httpParameterReadBigint.mjs","names":[],"sources":["../../src/internal/_httpParameterReadBigint.ts"],"sourcesContent":["export const _httpParameterReadBigint = (value: string) =>\n value !== \"null\" ? toBigint(value) : null;\n\nconst toBigint = (str: string): bigint | string => {\n try {\n return BigInt(str);\n } catch {\n return str;\n }\n};\n"],"mappings":";AAAA,MAAa,4BAA4B,UACvC,UAAU,SAAS,SAAS,KAAK,IAAI;AAEvC,MAAM,YAAY,QAAiC;CACjD,IAAI;EACF,OAAO,OAAO,GAAG;CACnB,QAAQ;EACN,OAAO;CACT;AACF"}