next-i18next
Version:
The easiest way to translate your NextJs apps.
16 lines (11 loc) • 380 B
JavaScript
;
require("core-js/modules/es.regexp.exec");
require("core-js/modules/es.string.replace");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.removeSubpath = void 0;
var removeSubpath = function removeSubpath(url, subpath) {
return url.replace(subpath, '').replace(/(https?:\/\/)|(\/)+/g, "$1$2");
};
exports.removeSubpath = removeSubpath;