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