Checking Environment Variables in an Effect-idiomatic Way

Is there a more Effect idiomatic to do this env checking?

const envTruish = (env: string | undefined) => env !== undefined && env !== 'false' && env !== '0'
const isCi = envTruish(process.env.CI)

const otelLayer = isCi ? Layer.empty : OtelLiveHttp({ serviceName: 'my-service' })
Was this page helpful?