1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

add extend

This commit is contained in:
程序员小墨 2022-12-08 23:39:25 +08:00
parent f3cc95b629
commit f4723761bf
4 changed files with 4776 additions and 5 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -5,10 +5,11 @@ const utils = require('../../utils');
const input = fs.readFileSync(path.join(__dirname, './data.txt'), 'utf8')
let list = input.trim().replace(/[\r\n a-zA-Z0-9-_~!@#$%^&*\(\)<>?:\"\{\},\.\/;'\[\]\|\\=+·!?【】()《》;:,。、…「」〔〕‘’“”»\t ©→]/g, "")
console.log(list)
console.log()
list = Array.from(new Set(list.split(''))).sort((a, b) => a.localeCompare(b)).join('')
console.log(list)
// console.log(list)
fs.writeFileSync(path.join(__dirname, './output.txt'), list, 'utf8')
return
for (let word of list) {
// 汉字