"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.urlConcat = urlConcat;

/**
 *
 * @param {String} url
 * @param {String} path
 */
function removeLastSlash(url) {
  return url.replace(/\/+$/, '');
}

function urlConcat(url, path) {
  url = removeLastSlash(url);
  path = removeFrontSlash(path);
  return `${url}/${path}`;
}

function removeFrontSlash(url) {
  return url.replace(/^\/+/, '');
}