格式化
This commit is contained in:
4
main.js
4
main.js
@@ -42,7 +42,9 @@ export function get_search(n = 10) {
|
|||||||
ex.set(key, (ex.get(key) || 0) + value)
|
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', {
|
const 日期格式 = new Intl.DateTimeFormat('zh-CN', {
|
||||||
|
Reference in New Issue
Block a user