MCPcopy Create free account
hub / github.com/freeCodeCamp/freeCodeCamp / undefinedOrBool

Function undefinedOrBool

api/src/utils/env.ts:247–253  ·  view source on GitHub ↗
(val: string | undefined)

Source from the content-addressed store, hash-verified

245export const TPA_API_BEARER_TOKEN = process.env.TPA_API_BEARER_TOKEN;
246
247function undefinedOrBool(val: string | undefined): undefined | boolean {
248 if (!val) {
249 return undefined;
250 }
251
252 return val === 'true';
253}
254export const DEPLOYMENT_VERSION = process.env.DEPLOYMENT_VERSION || 'unknown';

Callers 1

env.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected