MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / parseBoolean

Function parseBoolean

packages/core/src/widgets/styleUtils.ts:31–38  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

29]);
30
31function parseBoolean(value: unknown): boolean | undefined {
32 if (typeof value === "boolean") return value;
33 if (typeof value !== "string") return undefined;
34 const normalized = value.trim().toLowerCase();
35 if (normalized === "true") return true;
36 if (normalized === "false") return false;
37 return undefined;
38}
39
40function parseUnderlineStyle(value: unknown): UnderlineStyle | undefined {
41 if (typeof value === "string" && VALID_UNDERLINE_STYLES.has(value as UnderlineStyle)) {

Callers 1

sanitizeTextStyleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected