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

Function toBoolWithDefault

apps/api/src/config/env/validate.ts:73–77  ·  view source on GitHub ↗
(
  raw: string | undefined,
  defaultValue: boolean,
  name?: string
)

Source from the content-addressed store, hash-verified

71 * env file, the schema, and validate.ts in lockstep.
72 */
73export const toBoolWithDefault = (
74 raw: string | undefined,
75 defaultValue: boolean,
76 name?: string
77): boolean => (raw === undefined ? defaultValue : toBool(raw, name));
78
79export const toFloat = (
80 raw: string | undefined,

Callers 3

validate.test.tsFile · 0.90
readAuthFunction · 0.85
readBackgroundFunction · 0.85

Calls 1

toBoolFunction · 0.85

Tested by

no test coverage detected