* Drop a leading UTF-8 BOM (U+FEFF) from a freshly-read file. PowerShell 5.1's * default `Set-Content -Encoding utf8` writes a BOM; without this strip, * `JSON.parse` fails with an invisible "Unexpected token" error that renders * as a blank character on most consoles. Most JSON parsers strip BOM
(raw: string)
| 905 | * boundary — we just bring this one in line. |
| 906 | */ |
| 907 | function stripBom(raw: string): string { |
| 908 | return raw.charCodeAt(0) === 0xfeff ? raw.slice(1) : raw; |
| 909 | } |
| 910 | |
| 911 | function requireNonEmpty(flagName: string, value: string): void { |
| 912 | if (typeof value !== 'string' || value.trim().length === 0) { |
no outgoing calls
no test coverage detected