(argv)
| 32 | ); |
| 33 | |
| 34 | function parseArgs(argv) { |
| 35 | const parsed = {}; |
| 36 | |
| 37 | for (let index = 0; index < argv.length; index += 1) { |
| 38 | const arg = argv[index]; |
| 39 | if (arg === "--to") { |
| 40 | parsed.to = argv[++index]; |
| 41 | } else if (arg === "--file") { |
| 42 | parsed.file = argv[++index]; |
| 43 | } else if (arg === "--repo") { |
| 44 | parsed.repo = argv[++index]; |
| 45 | } else if (arg === "--branch") { |
| 46 | parsed.branch = argv[++index]; |
| 47 | } else { |
| 48 | throw new Error(`Unknown argument: ${arg}`); |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | return parsed; |
| 53 | } |
| 54 | |
| 55 | function toAbsoluteLinks(markdown, prefix) { |
| 56 | return markdown.replace( |
no outgoing calls
no test coverage detected