Files
plane/dev-wiki/core/lib/n-progress/utils/sameURL.ts
T
22ae10cf88 [WIKI-383] feat: dev wiki app (#3411)
* dev: 1

* fix: tubro name

* fix : floating sidebar

* --wip-- [skip ci]

* wip-2

* --wip-- [skip ci]

* wip

* fix: working wiki

---------

Co-authored-by: VipinDevelops <[email protected]>
2025-06-18 21:19:30 +05:30

17 lines
573 B
TypeScript

export function isSameURL(target: URL, current: URL) {
const cleanTarget =
target.protocol + '//' + target.host + target.pathname + target.search;
const cleanCurrent =
current.protocol + '//' + current.host + current.pathname + current.search;
return cleanTarget === cleanCurrent;
}
export function isSameURLWithoutSearch(target: URL, current: URL) {
const cleanTarget = target.protocol + '//' + target.host + target.pathname;
const cleanCurrent =
current.protocol + '//' + current.host + current.pathname;
return cleanTarget === cleanCurrent;
}