@ywfe/fe-tools 1.2.1-beta.15 → 1.2.1-beta.16
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/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/index.ts
CHANGED
package/lib/index.d.ts
CHANGED
package/lib/ywfe-tools.cjs
CHANGED
|
@@ -10739,6 +10739,35 @@ function request(_a) {
|
|
|
10739
10739
|
});
|
|
10740
10740
|
}
|
|
10741
10741
|
|
|
10742
|
+
function userInputToJson(_a) {
|
|
10743
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
10744
|
+
var res, result;
|
|
10745
|
+
var input = _b.input;
|
|
10746
|
+
return __generator(this, function (_c) {
|
|
10747
|
+
switch (_c.label) {
|
|
10748
|
+
case 0:
|
|
10749
|
+
console.log("input", input);
|
|
10750
|
+
return [4 /*yield*/, request({
|
|
10751
|
+
input: {
|
|
10752
|
+
url: "https://fc-typechat.ywwl.com/userInputToJson",
|
|
10753
|
+
method: "GET",
|
|
10754
|
+
params: input,
|
|
10755
|
+
},
|
|
10756
|
+
})];
|
|
10757
|
+
case 1:
|
|
10758
|
+
res = _c.sent();
|
|
10759
|
+
if (res.success) {
|
|
10760
|
+
result = res.data;
|
|
10761
|
+
return [2 /*return*/, result.success ? result.data : result];
|
|
10762
|
+
}
|
|
10763
|
+
else {
|
|
10764
|
+
return [2 /*return*/, res.success ? res.data : res];
|
|
10765
|
+
}
|
|
10766
|
+
}
|
|
10767
|
+
});
|
|
10768
|
+
});
|
|
10769
|
+
}
|
|
10770
|
+
|
|
10742
10771
|
function JSON2String(_a) {
|
|
10743
10772
|
var input = _a.input;
|
|
10744
10773
|
var _b = input.data, data = _b === void 0 ? {} : _b;
|
|
@@ -10752,4 +10781,5 @@ function JSON2String(_a) {
|
|
|
10752
10781
|
|
|
10753
10782
|
exports.JSON2String = JSON2String;
|
|
10754
10783
|
exports.request = request;
|
|
10784
|
+
exports.userInputToJson = userInputToJson;
|
|
10755
10785
|
//# sourceMappingURL=ywfe-tools.cjs.map
|