{"version":3,"file":"_httpHeaderReadBoolean.mjs","names":[],"sources":["../../src/internal/_httpHeaderReadBoolean.ts"],"sourcesContent":["/**\n * Read one header value as a boolean.\n *\n * Only `true` and `false` are read as booleans; other text is kept for the\n * assertion to reject, unlike query and path values, which also accept `1` and\n * `0`.\n *\n * @evidence contracts/common.md#principled-implementation Only the texts `true` and `false` are read as booleans and any other text, including `1` and `0` and the empty string, is returned for the validator to reject; a missing header is absent. This differs from the query and path readers, which also accept `1` and `0`.\n * @evidence contracts/common.md#clear-and-simple-design One conditional chain.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The narrower mapping is a stated difference and not an accident of copying.\n * @evidence contracts/common.md#meaningful-documentation A comment states the accepted texts and the difference.\n */\nexport const _httpHeaderReadBoolean = (value: string | undefined) =>\n  value !== undefined\n    ? value === \"true\"\n      ? true\n      : value === \"false\"\n        ? false\n        : value\n    : undefined;\n"],"mappings":";;;;;;;;;;;;;AAYA,MAAa,0BAA0B,UACrC,UAAU,KAAA,IACN,UAAU,SACR,OACA,UAAU,UACR,QACA,QACJ,KAAA"}