🚧 WIP: add uploader config list menu & rebuild multi-config communication way

This commit is contained in:
PiEgg
2022-12-31 20:44:19 +08:00
parent f0787d3ec2
commit 5969daedac
14 changed files with 247 additions and 53 deletions

View File

@@ -43,3 +43,11 @@ export const enforceNumber = (num: number | string) => {
}
export const isDev = process.env.NODE_ENV === 'development'
export const trimValues = (obj: IStringKeyMap) => {
const newObj = {} as IStringKeyMap
Object.keys(obj).forEach(key => {
newObj[key] = typeof obj[key] === 'string' ? obj[key].trim() : obj[key]
})
return newObj
}