MCPcopy Create free account
hub / github.com/deepnote/deepnote / compareUrls

Function compareUrls

test-helpers/expect-url-with-query-params.ts:6–14  ·  view source on GitHub ↗

* Compares URLs without query params order

(url1: string, url2: string)

Source from the content-addressed store, hash-verified

4 * Compares URLs without query params order
5 */
6function compareUrls(url1: string, url2: string) {
7 const url1Parsed = new URL(url1)
8 const url2Parsed = new URL(url2)
9
10 url1Parsed.searchParams.sort()
11 url2Parsed.searchParams.sort()
12
13 return url1Parsed.href === url2Parsed.href
14}
15
16expect.extend({
17 urlWithQueryParams(received: unknown, expected: string) {

Callers 1

urlWithQueryParamsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected