( commandOrValue: string, args: string[] = [], )
| 47 | * @returns Object with corrected command and args |
| 48 | */ |
| 49 | export function extractArgsAfterDoubleDash( |
| 50 | commandOrValue: string, |
| 51 | args: string[] = [], |
| 52 | ): { command: string; args: string[] } { |
| 53 | if (commandOrValue === '--' && args.length > 0) { |
| 54 | return { |
| 55 | command: args[0]!, |
| 56 | args: args.slice(1), |
| 57 | } |
| 58 | } |
| 59 | return { command: commandOrValue, args } |
| 60 | } |
| 61 |
nothing calls this directly
no outgoing calls
no test coverage detected