All files / src/functions fix.url.ts

100% Statements 7/7
100% Branches 2/2
100% Functions 1/1
100% Lines 6/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10    4x 23x 23x 23x 23x   4x  
'use strict';
 
const fixUrl = (url: string, relativeFilePath: string): string => {
	url = relativeFilePath + url;
	url = url.split('//').join('/');
	if (url.endsWith('/')) url = url.slice(0, -1);
	return url;
};
export default fixUrl;