@minto-ai/tools 1.0.46 → 1.0.47
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/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -13644,6 +13644,13 @@ function timeDelay(delay) {
|
|
|
13644
13644
|
setTimeout(resolve2, delay);
|
|
13645
13645
|
});
|
|
13646
13646
|
}
|
|
13647
|
+
function isValidUrl(url) {
|
|
13648
|
+
if (!isString(url)) {
|
|
13649
|
+
return false;
|
|
13650
|
+
}
|
|
13651
|
+
var urlPattern = /^https?:\/\/(?:[\w-]+:[\w-]+@)?(?:localhost|(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,}|(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))(?::\d{1,5})?(?:\/[^\s?#]*)?(?:\?[^\s#]*)?(?:#\S*)?$/i;
|
|
13652
|
+
return urlPattern.test(url.trim());
|
|
13653
|
+
}
|
|
13647
13654
|
function createWebSocket(url) {
|
|
13648
13655
|
return new WebSocket(url);
|
|
13649
13656
|
}
|
|
@@ -13708,6 +13715,7 @@ export {
|
|
|
13708
13715
|
isPptFilePath,
|
|
13709
13716
|
isString,
|
|
13710
13717
|
isUndefined,
|
|
13718
|
+
isValidUrl,
|
|
13711
13719
|
isVideoFilePath,
|
|
13712
13720
|
isWebSocketSupported,
|
|
13713
13721
|
multiply2 as multiply,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|