1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import normalizeURL from "npm:normalize-url";
import compareUrls from "npm:compare-urls";
const urlA =
"https://dimillian.medium.com/the-making-of-ice-cubes-an-open-source-swiftui-mastodon-client-45ebea5cf6b6?source=user_profile---------0----------------------------";
const urlB = "https://dimillian.medium.com/the-making-of-ice-cubes-an-open-source-swiftui-mastodon-client-45ebea5cf6b6";
console.log(compareUrls(urlA, urlB));
console.log(normalizeURL(urlA, {
stripWWW: false,
removeQueryParameters: true,
defaultProtocol: "https",
}));
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
July 8, 2024