🐛 Fix(db): fix some db bugs

#873,#806
This commit is contained in:
PiEgg
2022-06-12 20:20:08 +08:00
parent 8d861be161
commit d3bb5caa83
27 changed files with 238 additions and 107 deletions

View File

@@ -8,3 +8,11 @@ export const handleTalkingDataEvent = (data: ITalkingDataOptions) => {
console.log('talkingData', data)
}
}
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
}