@minto-ai/tools 1.0.46 → 1.0.48
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.
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
* 文件后缀类型枚举
|
|
3
3
|
*/
|
|
4
4
|
declare const FileSuffixEnum: {
|
|
5
|
-
readonly DOC: "doc";
|
|
6
5
|
readonly DOCX: "docx";
|
|
6
|
+
readonly DOC: "doc";
|
|
7
7
|
readonly PDF: "pdf";
|
|
8
|
-
readonly PPT: "ppt";
|
|
9
8
|
readonly PPTX: "pptx";
|
|
10
|
-
readonly
|
|
9
|
+
readonly PPT: "ppt";
|
|
11
10
|
readonly XLSX: "xlsx";
|
|
11
|
+
readonly XLS: "xls";
|
|
12
12
|
readonly JPG: "jpg";
|
|
13
13
|
readonly PNG: "png";
|
|
14
14
|
readonly JPEG: "jpeg";
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -13185,13 +13185,13 @@ function objectToQueryString(obj) {
|
|
|
13185
13185
|
}).join("&");
|
|
13186
13186
|
}
|
|
13187
13187
|
var FileSuffixEnum = {
|
|
13188
|
-
DOC: "doc",
|
|
13189
13188
|
DOCX: "docx",
|
|
13189
|
+
DOC: "doc",
|
|
13190
13190
|
PDF: "pdf",
|
|
13191
|
-
PPT: "ppt",
|
|
13192
13191
|
PPTX: "pptx",
|
|
13193
|
-
|
|
13192
|
+
PPT: "ppt",
|
|
13194
13193
|
XLSX: "xlsx",
|
|
13194
|
+
XLS: "xls",
|
|
13195
13195
|
JPG: "jpg",
|
|
13196
13196
|
PNG: "png",
|
|
13197
13197
|
JPEG: "jpeg",
|
|
@@ -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 {};
|