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