mybase 1.0.44 → 1.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/mybase.js +8 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/mybase.js
CHANGED
|
@@ -97,6 +97,12 @@ function randomIP() {
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
|
|
100
|
+
function isURL(url) {
|
|
101
|
+
if (typeof url === 'string') try { return new URL(url) } catch (e) { }
|
|
102
|
+
return false
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
|
|
100
106
|
function validTime(t) {
|
|
101
107
|
var valid = (t && parseInt(t)>0 && t.toString().length===10)
|
|
102
108
|
if (!valid) return false
|
|
@@ -609,5 +615,6 @@ module.exports = {
|
|
|
609
615
|
promiseTimeout,
|
|
610
616
|
utcnow,
|
|
611
617
|
Geoip2Paths,
|
|
612
|
-
randomHPassword
|
|
618
|
+
randomHPassword,
|
|
619
|
+
isURL
|
|
613
620
|
}
|