function trimTrailingSlash(str = '') {
  return (str.charAt(str.length - 1) === '/') ? str.slice(0, -1) : str
}
Trim trailing slash
@param {String} str - String to trim
@example
 trimTrailingSlash('google.com/')
 > google.com