(name: string)
| 51 | } |
| 52 | |
| 53 | getArg(name: string): string | undefined { |
| 54 | const key = `--${name}`; |
| 55 | const matcher = new RegExp(`^${key}($|=)`); |
| 56 | const index = this.args.findIndex((arg) => matcher.test(arg)); |
| 57 | if (index === -1) { |
| 58 | return; |
| 59 | } |
| 60 | |
| 61 | if (this.args[index].includes('=')) { |
| 62 | return this.args[index].split('=')[1]; |
| 63 | } |
| 64 | return this.args[index + 1]; |
| 65 | } |
| 66 | } |
no outgoing calls
no test coverage detected