MCPcopy Index your code
hub / github.com/Flagsmith/flagsmith / envToBool

Function envToBool

frontend/api/dev-routes.js:19–25  ·  view source on GitHub ↗
(name, defaultVal)

Source from the content-addressed store, hash-verified

17 return ` ${name}: '${value.trim()}',\n `
18 }
19 const envToBool = (name, defaultVal) => {
20 const envVar = `${process.env[name]}`
21 if (envVar === 'undefined') {
22 return defaultVal
23 }
24 return envVar === 'true' || envVar === '1'
25 }
26 const sha = ''
27 const values = [
28 { name: 'preventSignup', value: envToBool('PREVENT_SIGNUP', false) },

Callers 1

dev-routes.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected