(flag: string)
| 24 | * Splits on whitespace and checks for exact match to avoid false positives. |
| 25 | */ |
| 26 | export function hasNodeOption(flag: string): boolean { |
| 27 | const nodeOptions = process.env.NODE_OPTIONS |
| 28 | if (!nodeOptions) { |
| 29 | return false |
| 30 | } |
| 31 | return nodeOptions.split(/\s+/).includes(flag) |
| 32 | } |
| 33 | |
| 34 | export function isEnvTruthy(envVar: string | boolean | undefined): boolean { |
| 35 | if (!envVar) return false |
no outgoing calls
no test coverage detected