input environment variables.
const envVars = {
CCU__DJANGO__ALLOWED_HOSTS: '*',
CCU__DJANGO__CSRF_COOKIE_SECURE: 'False',
SENTRY__TRACE_EXCLUDE_URLS: 'one,two,three'
}
const result = transformEnvVars(envVars)
console.log(result)
// {
// ccu: {
// django: {
// allowedHosts: '*',
// csrfCookieSecure: false,
// },
// },
// sentry: {
// traceExcludeUrls: ['one', 'two', 'three'],
// },
// }
Generated using TypeDoc
Transform environment variables into a nested object. Expects '_' to delimit nested keys and '' to delimit camelCase keys. Expects 'True' and 'False' to be transformed into booleans. Expects comma-separated values to be transformed into arrays.