feat(*): 代码仓库初始化

This commit is contained in:
2025-11-07 18:39:29 +08:00
commit b1aeb6b39b
36 changed files with 1700 additions and 0 deletions

12
Server/2/utils.js Normal file
View File

@@ -0,0 +1,12 @@
const word_count = function (text) {
const text_list = text.replace(/[、\r?\n,\s]+/g, " ").split(" ");
let word_obj = {};
for (const word of text_list) {
word_obj[word] = (word_obj[word] || 0) + 1;
}
return word_obj;
};
module.exports = {
word_count,
};