mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-10-29 18:12:10 +08:00
refactor(frontend): remove unused modules
This commit is contained in:
@@ -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
|
||||
}
|
||||
@@ -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))
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user