openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
12 lines (11 loc) • 384 B
JavaScript
//#region packages/normalization-core/src/boolean-coercion.ts
/** Parses booleans and case-insensitive `true`/`false` string tokens. */
function parseBoolean(e) {
if (typeof e === "boolean") return e;
if (typeof e !== "string") return;
const t = e.trim().toLowerCase();
if (t === "true") return true;
if (t === "false") return false;
}
//#endregion
export { parseBoolean as t };