refactor(frontend): remove unused modules

This commit is contained in:
Tunglies
2026-07-12 12:42:27 +08:00
parent 656b6b6d44
commit 14bc636ee8
38 changed files with 6 additions and 797 deletions
-14
View File
@@ -1,14 +0,0 @@
// Deep copy and change all keys to lowercase
type TData = Record<string, any>
export default function ignoreCase(data: TData): TData {
if (!data) return {}
const newData = {} as TData
Object.entries(data).forEach(([key, value]) => {
newData[key.toLowerCase()] = JSON.parse(JSON.stringify(value))
})
return newData
}
-6
View File
@@ -1,6 +0,0 @@
export const truncateStr = (str?: string, prefixLen = 16, maxLen = 56) => {
if (!str || str.length <= maxLen) return str
return (
str.slice(0, prefixLen) + ' ... ' + str.slice(-(maxLen - prefixLen - 5))
)
}