let path = "/some/string/with-trailing-slash/"
path = path.replace(//$/, "") // /some/string/with-a-slash
// * * *
let path = "/some/string/without-a-trailing-slash"
path = path.replace(//$/, "") // /some/string/without-a-trailing-slash
str = str.replace(//g, '')
string.replace(//$/, "")
function someFunction(site)
{
return site.replace(//$/, "");
}