Files
30-seconds-of-code/node_modules/gatsby/cache-dir/commonjs/normalize-page-path.js
2019-08-20 15:52:05 +02:00

22 lines
314 B
JavaScript

"use strict";
exports.__esModule = true;
exports.default = void 0;
var _default = path => {
if (path === undefined) {
return path;
}
if (path === `/`) {
return `/`;
}
if (path.charAt(path.length - 1) === `/`) {
return path.slice(0, -1);
}
return path;
};
exports.default = _default;