@ywfe/fe-tools 1.2.1-beta.15 → 1.2.1-beta.16
Sign up to get free protection for your applications and to get access to all the features.
- package/index.ts +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/userInputToJson.d.ts +8 -0
- package/lib/ywfe-tools.cjs +30 -0
- package/lib/ywfe-tools.cjs.map +1 -1
- package/lib/ywfe-tools.esm.js +30 -1
- 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/userInputToJson.ts +25 -0
package/lib/ywfe-tools.esm.js
CHANGED
@@ -10737,6 +10737,35 @@ function request(_a) {
|
|
10737
10737
|
});
|
10738
10738
|
}
|
10739
10739
|
|
10740
|
+
function userInputToJson(_a) {
|
10741
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
10742
|
+
var res, result;
|
10743
|
+
var input = _b.input;
|
10744
|
+
return __generator(this, function (_c) {
|
10745
|
+
switch (_c.label) {
|
10746
|
+
case 0:
|
10747
|
+
console.log("input", input);
|
10748
|
+
return [4 /*yield*/, request({
|
10749
|
+
input: {
|
10750
|
+
url: "https://fc-typechat.ywwl.com/userInputToJson",
|
10751
|
+
method: "GET",
|
10752
|
+
params: input,
|
10753
|
+
},
|
10754
|
+
})];
|
10755
|
+
case 1:
|
10756
|
+
res = _c.sent();
|
10757
|
+
if (res.success) {
|
10758
|
+
result = res.data;
|
10759
|
+
return [2 /*return*/, result.success ? result.data : result];
|
10760
|
+
}
|
10761
|
+
else {
|
10762
|
+
return [2 /*return*/, res.success ? res.data : res];
|
10763
|
+
}
|
10764
|
+
}
|
10765
|
+
});
|
10766
|
+
});
|
10767
|
+
}
|
10768
|
+
|
10740
10769
|
function JSON2String(_a) {
|
10741
10770
|
var input = _a.input;
|
10742
10771
|
var _b = input.data, data = _b === void 0 ? {} : _b;
|
@@ -10748,5 +10777,5 @@ function JSON2String(_a) {
|
|
10748
10777
|
}
|
10749
10778
|
}
|
10750
10779
|
|
10751
|
-
export { JSON2String, request };
|
10780
|
+
export { JSON2String, request, userInputToJson };
|
10752
10781
|
//# sourceMappingURL=ywfe-tools.esm.js.map
|