Lowercase URL scheme (without the trailing colon), or undefined if absent.
(value: string)
| 34 | |
| 35 | /** Lowercase URL scheme (without the trailing colon), or undefined if absent. */ |
| 36 | function schemeOf(value: string): string | undefined { |
| 37 | return /^([a-z][a-z0-9+.-]*):/i.exec(value)?.[1]?.toLowerCase(); |
| 38 | } |
| 39 | |
| 40 | /** First non-blank value among `keys` (both casings are passed in by callers). */ |
| 41 | function firstNonBlank(env: Env, keys: readonly string[]): string | undefined { |
no test coverage detected