1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", { value: true });
|
4 | exports.removeLeadingSlashes = exports.removeTrailingSlashes = exports.removeSlashes = void 0;
|
5 |
|
6 |
|
7 |
|
8 | function removeSlashes(path) {
|
9 | path = removeLeadingSlashes(path);
|
10 | path = removeTrailingSlashes(path);
|
11 | return path;
|
12 | }
|
13 | exports.removeSlashes = removeSlashes;
|
14 |
|
15 |
|
16 |
|
17 | function removeTrailingSlashes(path) {
|
18 | return path.endsWith('/') ? path.slice(0, -1) : path;
|
19 | }
|
20 | exports.removeTrailingSlashes = removeTrailingSlashes;
|
21 |
|
22 |
|
23 |
|
24 | function removeLeadingSlashes(path) {
|
25 | return path.startsWith('/') ? path.slice(1) : path;
|
26 | }
|
27 | exports.removeLeadingSlashes = removeLeadingSlashes;
|
28 |
|
\ | No newline at end of file |