style: format style

This commit is contained in:
xiaoxian521
2021-07-20 17:16:42 +08:00
parent a5172c9476
commit 9bb4f34707
9 changed files with 105 additions and 99 deletions

View File

@@ -2,9 +2,9 @@ type ProxyItem = [string, string];
type ProxyList = ProxyItem[];
const regExps = (value: string,reg: string): string => {
return value.replace(new RegExp(reg, 'g'), '');
}
const regExps = (value: string, reg: string): string => {
return value.replace(new RegExp(reg, "g"), "");
};
export function createProxy(list: ProxyList = []) {
const ret: any = {};
@@ -12,8 +12,8 @@ export function createProxy(list: ProxyList = []) {
ret[prefix] = {
target: target,
changeOrigin: true,
rewrite: (path:string) => regExps(path, prefix)
rewrite: (path: string) => regExps(path, prefix)
};
}
return ret;
}
}