{"version":3,"file":"_httpParameterReadBoolean.mjs","names":[],"sources":["../../src/internal/_httpParameterReadBoolean.ts"],"sourcesContent":["/**\n * Read one path parameter as a boolean.\n *\n * `true` and `1` are true, `false` and `0` are false, `null` is null and other\n * text is kept for the assertion to reject.\n *\n * @evidence contracts/common.md#principled-implementation The text `null` is null, `true` and `1` are true, `false` and `0` are false and other text is returned for the validator to reject.\n * @evidence contracts/common.md#clear-and-simple-design One conditional chain.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The mapping is the path-parameter contract.\n * @evidence contracts/common.md#meaningful-documentation A comment states the mapping.\n */\nexport const _httpParameterReadBoolean = (value: string) =>\n  value !== \"null\"\n    ? value === \"true\" || value === \"1\"\n      ? true\n      : value === \"false\" || value === \"0\"\n        ? false\n        : value\n    : null;\n"],"mappings":";;;;;;;;;;;;AAWA,MAAa,6BAA6B,UACxC,UAAU,SACN,UAAU,UAAU,UAAU,MAC5B,OACA,UAAU,WAAW,UAAU,MAC7B,QACA,QACJ"}