function safeUrl(url) {
  const stripped = stripTrailing(url || '', '/');
  return stripped ? stripped + '/' : '';
}
Given a string remove trailing slashes and adds 1 slash at the end of the string.

Example:
safeUrl('/value/')
// 'value/'

@param url
@returns {string}