typia
Version:
Superfast runtime validators with only one line
1 lines • 556 B
Source Map (JSON)
{"version":3,"file":"_httpHeaderReadNumber.mjs","names":[],"sources":["../../src/internal/_httpHeaderReadNumber.ts"],"sourcesContent":["export const _httpHeaderReadNumber = (value: string | undefined) =>\n value !== undefined ? toNumber(value) : undefined;\n\nconst toNumber = (str: string): number | string => {\n const value: number = Number(str);\n return isNaN(value) ? str : value;\n};\n"],"mappings":";AAAA,MAAa,yBAAyB,UACpC,UAAU,KAAA,IAAY,SAAS,KAAK,IAAI,KAAA;AAE1C,MAAM,YAAY,QAAiC;CACjD,MAAM,QAAgB,OAAO,GAAG;CAChC,OAAO,MAAM,KAAK,IAAI,MAAM;AAC9B"}