export default (API_URL = '', requestPath = '') => {
  // Remove trailing slash if given
  const sanitizedApiUrl = API_URL.replace(/\/$/, '');
  // Make sure request path has starting slash
  const sanitizedRequestPath = requestPath.replace(/^\//, '');
  // Return joined URL
  return [sanitizedApiUrl, sanitizedRequestPath].join('/');
};

export default (API_URL = '', requestPath = '') => {
  // Remove trailing slash if given
  const sanitizedApiUrl = API_URL.replace(/\/$/, '');
  // Remove starting starting slash from request path
  const sanitizedRequestPath = requestPath.replace(/^\//, '');
  // Return URL joined with a slash
  return [sanitizedApiUrl, sanitizedRequestPath].join('/');
};

Update createApiUrl helper