(src: string, dest: string)
| 197 | } |
| 198 | |
| 199 | export function isSameFilepath(src: string, dest: string): boolean { |
| 200 | if (!src || !dest) { |
| 201 | return false |
| 202 | } |
| 203 | src = normalizePath(src) |
| 204 | dest = normalizePath(dest) |
| 205 | const srcExt = parse(src).ext |
| 206 | const destExt = parse(dest).ext |
| 207 | if (srcExt && destExt && srcExt !== destExt) { |
| 208 | return false |
| 209 | } |
| 210 | if (srcExt) { |
| 211 | src = src.slice(0, -srcExt.length) |
| 212 | } |
| 213 | if (destExt) { |
| 214 | dest = dest.slice(0, -destExt.length) |
| 215 | } |
| 216 | return src === dest |
| 217 | } |
| 218 | |
| 219 | export type Remote = { id: string; regexp: RegExp; config: RemotesConfig } |
| 220 |
no test coverage detected
searching dependent graphs…