runtime-env.ts
1 function normalizedNodeEnv(): string { 2 return typeof process.env.NODE_ENV === 'string' 3 ? process.env.NODE_ENV.trim().toLowerCase() 4 : '' 5 } 6 7 export function isProductionRuntime(): boolean { 8 return normalizedNodeEnv() === 'production' 9 } 10 11 export function isDevelopmentLikeRuntime(): boolean { 12 return !isProductionRuntime() 13 }