πŸ“„ File detail

constants/keys.ts

🧩 .tsπŸ“ 12 linesπŸ’Ύ 444 bytesπŸ“ text
← Back to All Files

🎯 Use case

This file lives under β€œconstants/”, which covers static strings, built-in prompts, spinners, and style constants. On the API surface it exposes getGrowthBookClientKey β€” mainly functions, hooks, or classes. It composes internal code from utils (relative imports). What the file header says: Lazy read so ENABLE_GROWTHBOOK_DEV from globalSettings.env (applied after module load) is picked up. USER_TYPE is a build-time define so it's safe.

Generated from folder role, exports, dependency roots, and inline comments β€” not hand-reviewed for every path.

🧠 Inline summary

Lazy read so ENABLE_GROWTHBOOK_DEV from globalSettings.env (applied after module load) is picked up. USER_TYPE is a build-time define so it's safe.

πŸ“€ Exports (heuristic)

  • getGrowthBookClientKey

πŸ–₯️ Source preview

import { isEnvTruthy } from '../utils/envUtils.js'

// Lazy read so ENABLE_GROWTHBOOK_DEV from globalSettings.env (applied after
// module load) is picked up. USER_TYPE is a build-time define so it's safe.
export function getGrowthBookClientKey(): string {
  return process.env.USER_TYPE === 'ant'
    ? isEnvTruthy(process.env.ENABLE_GROWTHBOOK_DEV)
      ? 'sdk-yZQvlplybuXjYh6L'
      : 'sdk-xRVcrliHIlrg4og4'
    : 'sdk-zAZezfDKGoZuXXKe'
}