(flag: string)
| 52 | * Splits on whitespace and checks for exact match to avoid false positives. |
| 53 | */ |
| 54 | export function hasNodeOption(flag: string): boolean { |
| 55 | const nodeOptions = process.env.NODE_OPTIONS |
| 56 | if (!nodeOptions) { |
| 57 | return false |
| 58 | } |
| 59 | return nodeOptions.split(/\s+/).includes(flag) |
| 60 | } |
| 61 | |
| 62 | export function isEnvTruthy(envVar: string | boolean | undefined): boolean { |
| 63 | if (!envVar) return false |
no outgoing calls
no test coverage detected