@ywfe/fe-tools 1.2.1-beta.29 → 1.2.1-beta.30
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/userInputToJson.d.ts +5 -1
- package/lib/ywfe-tools.cjs +10 -17
- package/lib/ywfe-tools.cjs.map +1 -1
- package/lib/ywfe-tools.esm.js +10 -17
- package/lib/ywfe-tools.esm.js.map +1 -1
- package/lib/ywfe-tools.umd.js +2 -2
- package/lib/ywfe-tools.umd.js.map +1 -1
- package/package.json +1 -1
- package/request.ts +1 -0
- package/userInputToJson.ts +2 -7
package/lib/userInputToJson.d.ts
CHANGED
package/lib/ywfe-tools.cjs
CHANGED
@@ -8727,6 +8727,7 @@ function request(_a) {
|
|
8727
8727
|
"((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|" + // domain name
|
8728
8728
|
"((\d{1,3}\.){3}\d{1,3}))" + // OR ip (v4) address
|
8729
8729
|
"(\:\d+)?(\/[-a-z\d%_.~+]*)*" + // port and path
|
8730
|
+
"(\?[;&a-z\d%_.~+=-]*)?" + // query string
|
8730
8731
|
"(\#[-a-z\d_]*)?$", "i"); // fragment locator
|
8731
8732
|
return !!pattern.test(url);
|
8732
8733
|
};
|
@@ -8763,28 +8764,20 @@ function request(_a) {
|
|
8763
8764
|
|
8764
8765
|
function userInputToJson(_a) {
|
8765
8766
|
return __awaiter(this, arguments, void 0, function (_b) {
|
8766
|
-
var res
|
8767
|
+
var res;
|
8767
8768
|
var input = _b.input;
|
8768
8769
|
return __generator(this, function (_c) {
|
8769
8770
|
switch (_c.label) {
|
8770
|
-
case 0:
|
8771
|
-
|
8772
|
-
|
8773
|
-
|
8774
|
-
|
8775
|
-
|
8776
|
-
|
8777
|
-
},
|
8778
|
-
})];
|
8771
|
+
case 0: return [4 /*yield*/, request({
|
8772
|
+
input: {
|
8773
|
+
url: "https://fc-typechat.ywwl.com/userInputToJson",
|
8774
|
+
method: "GET",
|
8775
|
+
params: input,
|
8776
|
+
},
|
8777
|
+
})];
|
8779
8778
|
case 1:
|
8780
8779
|
res = _c.sent();
|
8781
|
-
|
8782
|
-
result = res.data;
|
8783
|
-
return [2 /*return*/, result.success ? result.data : result];
|
8784
|
-
}
|
8785
|
-
else {
|
8786
|
-
return [2 /*return*/, res.success ? res.data : res];
|
8787
|
-
}
|
8780
|
+
return [2 /*return*/, res];
|
8788
8781
|
}
|
8789
8782
|
});
|
8790
8783
|
});
|