8 lines
250 B
TypeScript
8 lines
250 B
TypeScript
|
const combineUrls = (piece1: string, piece2: string): string => {
|
||
|
let baseElement = piece1;
|
||
|
if (baseElement.endsWith("/")) baseElement = baseElement.substring(0, baseElement.length - 1);
|
||
|
return baseElement + piece2;
|
||
|
};
|
||
|
|
||
|
export { combineUrls };
|