MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / isBoolValue

Function isBoolValue

apps/api/src/lib/acl/feature-resolution.ts:12–22  ·  view source on GitHub ↗
(raw: unknown)

Source from the content-addressed store, hash-verified

10} from "./feature-resolution.types";
11
12const isBoolValue = (raw: unknown): raw is { bool: boolean } => {
13 if (typeof raw !== "object" || raw === null) {
14 return false;
15 }
16
17 return !("bool" in raw) ? false : typeof raw.bool === "boolean";
18};
19
20const isNumberValue = (raw: unknown): raw is { number: number } => {
21 if (typeof raw !== "object" || raw === null) {
22 return false;
23 }
24
25 return !("number" in raw) ? false : typeof raw.number === "number";

Callers 1

resolveBooleanFeatureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected