@ywfe/fe-tools 1.0.2-beta.10 → 1.0.2-beta.11
Sign up to get free protection for your applications and to get access to all the features.
- package/index.ts +1 -0
- package/lib/ywfe-tools.esm.js +23 -0
- package/lib/ywfe-tools.esm.js.map +1 -1
- package/package.json +1 -1
- package/request.ts +1 -1
- package/userInputToJson.ts +16 -0
package/package.json
CHANGED
package/request.ts
CHANGED
@@ -17,7 +17,7 @@ async function request({input}:{input:RequestOptions}){
|
|
17
17
|
const env = '{{env}}';
|
18
18
|
return basePathMap.get(env);
|
19
19
|
};
|
20
|
-
const isValidURL = (url
|
20
|
+
const isValidURL = (url)=> {
|
21
21
|
var pattern = new RegExp(
|
22
22
|
'^(https?:\\/\\/)?' + // protocol
|
23
23
|
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name
|
@@ -0,0 +1,16 @@
|
|
1
|
+
// Ctrl-S保存代码
|
2
|
+
interface userInput {
|
3
|
+
userInput?:string,
|
4
|
+
rules?:string,
|
5
|
+
}
|
6
|
+
async function userInputToJson({input}:{input:userInput}){
|
7
|
+
const {userInput, rules} = input
|
8
|
+
const res = await feTools.request({
|
9
|
+
input:{
|
10
|
+
url:"https://fc-typechat.ywwl.com/userInputToJson",
|
11
|
+
method:"GET"
|
12
|
+
}
|
13
|
+
})
|
14
|
+
return res
|
15
|
+
}
|
16
|
+
export default userInputToJson
|