( parsedOrOptions: ParsedArgs | Map<string, string | boolean>, name: string )
| 75 | export function getString(parsed: ParsedArgs, name: string): string | undefined; |
| 76 | export function getString(options: Map<string, string | boolean>, name: string): string | undefined; |
| 77 | export function getString( |
| 78 | parsedOrOptions: ParsedArgs | Map<string, string | boolean>, |
| 79 | name: string |
| 80 | ): string | undefined { |
| 81 | const options = |
| 82 | parsedOrOptions instanceof Map |
| 83 | ? parsedOrOptions |
| 84 | : parsedOrOptions.options; |
| 85 | const v = options.get(name); |
| 86 | return typeof v === 'string' ? v : undefined; |
| 87 | } |
| 88 | |
| 89 | /** Returns all values for a repeatable flag (e.g. --tag foo --tag bar). */ |
| 90 | export function getStrings(parsed: ParsedArgs, name: string): string[] { |
no test coverage detected