Urara-Blog/node_modules/.pnpm-store/v3/files/73/c7f530f1bf669cb50f4d923129ddeb30192086e1811c6be527077b7b399291ec88ad30578d368b46fd1cfcf5fb8e1fcba488ed99eaefe9d90efbe372fcbeba
2022-08-14 01:14:53 +08:00

13 lines
419 B
Text

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.joinPathSegments = void 0;
function joinPathSegments(a, b, separator) {
/**
* The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`).
*/
if (a.endsWith(separator)) {
return a + b;
}
return a + separator + b;
}
exports.joinPathSegments = joinPathSegments;