"use strict";

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

function urlConcat(p1 = '', p2 = '') {
  if (p1[p1.length - 1] === '/') {
    if (p2[0] === '/') {
      return p1 + p2.slice(1);
    }

    return p1 + p2;
  }

  if (p2[0] === '/') {
    return p1 + p2;
  }

  return `${p1}/${p2}`;
}