@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/ywfe-tools.esm.js
CHANGED
@@ -8725,6 +8725,7 @@ function request(_a) {
|
|
8725
8725
|
"((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|" + // domain name
|
8726
8726
|
"((\d{1,3}\.){3}\d{1,3}))" + // OR ip (v4) address
|
8727
8727
|
"(\:\d+)?(\/[-a-z\d%_.~+]*)*" + // port and path
|
8728
|
+
"(\?[;&a-z\d%_.~+=-]*)?" + // query string
|
8728
8729
|
"(\#[-a-z\d_]*)?$", "i"); // fragment locator
|
8729
8730
|
return !!pattern.test(url);
|
8730
8731
|
};
|
@@ -8761,28 +8762,20 @@ function request(_a) {
|
|
8761
8762
|
|
8762
8763
|
function userInputToJson(_a) {
|
8763
8764
|
return __awaiter(this, arguments, void 0, function (_b) {
|
8764
|
-
var res
|
8765
|
+
var res;
|
8765
8766
|
var input = _b.input;
|
8766
8767
|
return __generator(this, function (_c) {
|
8767
8768
|
switch (_c.label) {
|
8768
|
-
case 0:
|
8769
|
-
|
8770
|
-
|
8771
|
-
|
8772
|
-
|
8773
|
-
|
8774
|
-
|
8775
|
-
},
|
8776
|
-
})];
|
8769
|
+
case 0: return [4 /*yield*/, request({
|
8770
|
+
input: {
|
8771
|
+
url: "https://fc-typechat.ywwl.com/userInputToJson",
|
8772
|
+
method: "GET",
|
8773
|
+
params: input,
|
8774
|
+
},
|
8775
|
+
})];
|
8777
8776
|
case 1:
|
8778
8777
|
res = _c.sent();
|
8779
|
-
|
8780
|
-
result = res.data;
|
8781
|
-
return [2 /*return*/, result.success ? result.data : result];
|
8782
|
-
}
|
8783
|
-
else {
|
8784
|
-
return [2 /*return*/, res.success ? res.data : res];
|
8785
|
-
}
|
8778
|
+
return [2 /*return*/, res];
|
8786
8779
|
}
|
8787
8780
|
});
|
8788
8781
|
});
|