UNPKG

typia

Version:

Superfast runtime validators with only one line

1 lines 547 B
{"version":3,"file":"_httpHeaderReadBigint.mjs","names":[],"sources":["../../src/internal/_httpHeaderReadBigint.ts"],"sourcesContent":["export const _httpHeaderReadBigint = (value: string | undefined) =>\n value !== undefined ? toBigint(value) : undefined;\n\nconst toBigint = (str: string): bigint | string => {\n try {\n return BigInt(str);\n } catch {\n return str;\n }\n};\n"],"mappings":";AAAA,MAAa,yBAAyB,UACpC,UAAU,KAAA,IAAY,SAAS,KAAK,IAAI,KAAA;AAE1C,MAAM,YAAY,QAAiC;CACjD,IAAI;EACF,OAAO,OAAO,GAAG;CACnB,QAAQ;EACN,OAAO;CACT;AACF"}