Last change
on this file since eed0bf8 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
419 bytes
|
Line | |
---|
1 | "use strict";
|
---|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
3 | exports.joinPathSegments = void 0;
|
---|
4 | function joinPathSegments(a, b, separator) {
|
---|
5 | /**
|
---|
6 | * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`).
|
---|
7 | */
|
---|
8 | if (a.endsWith(separator)) {
|
---|
9 | return a + b;
|
---|
10 | }
|
---|
11 | return a + separator + b;
|
---|
12 | }
|
---|
13 | exports.joinPathSegments = joinPathSegments;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.