Files
openclaw/extensions/qa-lab/src/mantis-options.runtime.ts
2026-06-20 07:04:11 +08:00

11 lines
417 B
TypeScript

// Qa Lab plugin module implements shared Mantis option parsing helpers.
export function trimToValue(value: string | undefined) {
const trimmed = value?.trim();
return trimmed && trimmed.length > 0 ? trimmed : undefined;
}
export function isTruthyOptIn(value: string | undefined) {
const normalized = value?.trim().toLowerCase();
return normalized === "1" || normalized === "true" || normalized === "yes";
}