Why do I love ClojureScript? Because when Google makes your life hard, https://github.com/quoll/michelangelo/blob/main/src/michelangelo/uri.cljs ๐
My comment, and the reason I didnโt send to #clojurescript instead, is due to goog.Uri https://github.com/google/closure-library/issues/1209 (preserving empty elements, like fragments). Also, I was shocked to discover that we canโt compare URIs in ClojureScript, and the hash codes are based on the object IDs, so the same URI created twice is seen as completely different.
Yes, the URL/ URI handling is nasty and it could probably be faster in many cases too. I haven't really found a library that I would like and the things I implemented for OrgPad are not really nice or general either.