(args: readonly string[])
| 689 | * or option values legitimately contain `>` characters. |
| 690 | */ |
| 691 | export function tokenizeArgv(args: readonly string[]): string[] { |
| 692 | const out: string[] = []; |
| 693 | for (const arg of args) { |
| 694 | if (arg === ">") continue; |
| 695 | if (!arg.includes(">")) { |
| 696 | out.push(arg); |
| 697 | continue; |
| 698 | } |
| 699 | for (const piece of arg.split(">")) { |
| 700 | if (piece) out.push(piece); |
| 701 | } |
| 702 | } |
| 703 | return out; |
| 704 | } |
| 705 | |
| 706 | // Re-export tokenize so callers only import from one place. |
| 707 | export { tokenize }; |
no test coverage detected