mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-01 19:20:21 +00:00
refactor: dedupe lower-parser readers
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { normalizeOptionalString } from "../shared/string-coerce.js";
|
||||
|
||||
export type BooleanParseOptions = {
|
||||
truthy?: string[];
|
||||
falsy?: string[];
|
||||
@@ -18,7 +20,7 @@ export function parseBooleanValue(
|
||||
if (typeof value !== "string") {
|
||||
return undefined;
|
||||
}
|
||||
const normalized = value.trim().toLowerCase();
|
||||
const normalized = normalizeOptionalString(value)?.toLowerCase();
|
||||
if (!normalized) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user