格式化

This commit is contained in:
2024-12-16 11:48:05 +08:00
parent e62c113c93
commit a9b6a2c7fd

View File

@@ -42,7 +42,9 @@ export function get_search(n = 10) {
ex.set(key, (ex.get(key) || 0) + value)
})
}
return [...ex.entries()].sort((a, b) => b[1] - a[1]).slice(0, n)
return [...ex.entries()].sort((a, b) => b[1] - a[1]).slice(0, n).map(([text, count]) => {
return { text, count }
})
}
const 日期格式 = new Intl.DateTimeFormat('zh-CN', {