Normalize any URL for easy comparison. This will alphabetically sort query parameters and remove useless /index.html for example.

normalizeUrl(url)

Examples

normalizeUrl(
  'https://projects.pixelastic.com/firost/index.html?name=tim&version=1'
);
// https://projects.pixelastic.com/firost/?name=tim&version=1