@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/package.json
CHANGED
package/request.ts
CHANGED
@@ -23,6 +23,7 @@ async function request({ input }: { input: RequestOptions }) {
|
|
23
23
|
"((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|" + // domain name
|
24
24
|
"((\d{1,3}\.){3}\d{1,3}))" + // OR ip (v4) address
|
25
25
|
"(\:\d+)?(\/[-a-z\d%_.~+]*)*" + // port and path
|
26
|
+
"(\?[;&a-z\d%_.~+=-]*)?" + // query string
|
26
27
|
"(\#[-a-z\d_]*)?$",
|
27
28
|
"i"
|
28
29
|
); // fragment locator
|
package/userInputToJson.ts
CHANGED
@@ -5,7 +5,6 @@ interface userInput {
|
|
5
5
|
rules?: string;
|
6
6
|
}
|
7
7
|
async function userInputToJson({ input }: { input: userInput }) {
|
8
|
-
console.log("input", input);
|
9
8
|
const res: { message: string; success: boolean; data: any } =
|
10
9
|
await request({
|
11
10
|
input: {
|
@@ -14,11 +13,7 @@ async function userInputToJson({ input }: { input: userInput }) {
|
|
14
13
|
params: input,
|
15
14
|
},
|
16
15
|
});
|
17
|
-
|
18
|
-
|
19
|
-
return result.success ? result.data : result;
|
20
|
-
} else {
|
21
|
-
return res.success ? res.data : res;
|
22
|
-
}
|
16
|
+
return res
|
17
|
+
|
23
18
|
}
|
24
19
|
export default userInputToJson
|