UNPKG
@naimo84/dav
Version:
latest (1.9.0)
1.9.0
WebDAV, CalDAV, and CardDAV client for nodejs and the browser
github.com/gaye/dav
gaye/dav
@naimo84/dav
/
lib
/
fuzzy_url_equals.js
11 lines
(9 loc)
•
315 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
'use strict'
;
export
default
function
fuzzyUrlEquals
(
one, other
) {
return
fuzzyIncludes
(one, other) ||
fuzzyIncludes
(other, one); };
function
fuzzyIncludes
(
one, other
) {
return
one.
indexOf
(other) !== -
1
|| (other.
charAt
(other.
length
-
1
) ===
'/'
&& one.
indexOf
(other.
slice
(
0
, -
1
)) !== -
1
); }