Documentation - v0.0.0
    Preparing search index...

    Function transformEnvVars

    • 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.

      Parameters

      • envVars: { [key: string]: undefined | string }

        input environment variables.

      Returns TransformedEnv

      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'],
      // },
      // }