(...paths: string[])
| 199 | }; |
| 200 | |
| 201 | const join = function join(...paths: string[]) { |
| 202 | if (paths.length === 0) { |
| 203 | return '.'; |
| 204 | } |
| 205 | let joined; |
| 206 | for (let i = 0; i < paths.length; ++i) { |
| 207 | const arg = paths[i]; |
| 208 | assertPath(arg); |
| 209 | if (arg.length > 0) { |
| 210 | if (joined === undefined) { |
| 211 | joined = arg; |
| 212 | } else { |
| 213 | joined += '/' + arg; |
| 214 | } |
| 215 | } |
| 216 | } |
| 217 | if (joined === undefined) { |
| 218 | return '.'; |
| 219 | } |
| 220 | return normalize(joined); |
| 221 | }; |
| 222 | |
| 223 | const relative = function relative(from: string, to: string) { |
| 224 | assertPath(from); |
searching dependent graphs…