mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-06-01 09:59:47 +08:00
🚧 WIP: add uploader config list menu & rebuild multi-config communication way
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user