UNPKG
@adoratorio/demetra
Version:
latest (2.6.5)
2.6.5
2.6.4
2.6.3
2.6.2
2.6.1
2.6.0
2.5.2
2.5.1
2.5.0
2.4.23
2.4.22
2.4.21
2.4.20
2.4.19
2.4.18
2.4.17
2.4.16
2.4.15
2.4.14
2.4.13
2.4.12
2.4.11
2.4.10
2.4.9
2.4.8
2.4.7
2.4.6
2.4.5
2.4.4
2.4.3
2.4.2
2.4.1
2.3.0
2.2.0
2.1.0
2.0.12
2.0.11
2.0.10
2.0.9
2.0.8
2.0.7
2.0.6
2.0.5
2.0.4
2.0.3
2.0.2
2.0.1
0.1.26
0.1.25
0.1.24
0.1.23
0.1.22
0.1.21
0.1.20
0.1.19
0.1.18
0.1.17
0.1.16
0.1.15
0.1.14
0.1.13
0.1.12
0.1.1
0.0.13
0.0.12
0.0.11
0.0.10
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
Internal use library for wordpress API request
github.com/Adoratorio/demetra
Adoratorio/demetra
@adoratorio/demetra
/
dist
/
validators.js
5 lines
•
228 B
JavaScript
View Raw
1
2
3
4
5
export
const
validateUrl
= (
url
) => {
const
pattern =
new
RegExp
(
/^(http|https):\/\/[\w\-.]*(:[0-9]+)?\/\w*\/?(api)*(\.php)*$/i
);
return
pattern.
test
(url) || url.
startsWith
(
'/'
); };
//# sourceMappingURL=validators.js.map