UNPKG
dav
Version:
latest (1.8.0)
1.8.0
1.7.8
1.7.6
1.7.5
1.7.4
1.7.3
1.7.2
1.7.1-gamma
1.7.1-delta
1.7.1-beta
1.7.1-alpha
1.7.0
1.6.5
1.6.4
1.6.2
1.6.0
1.5.5
1.5.4
1.5.2
1.5.1
1.5.0
1.4.1
1.3.0
1.2.0
1.1.1
1.0.3
1.0.2
0.0.1-alpha
WebDAV, CalDAV, and CardDAV client for nodejs and the browser
github.com/gaye/dav
gaye/dav
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
); }