add extend
This commit is contained in:
parent
f4723761bf
commit
88dea913c3
4986
data-friendly.json
4986
data-friendly.json
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
6
get-total.js
Normal file
6
get-total.js
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
const fs = require('fs');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
const DataFile = path.join(__dirname, './data-single-word.txt')
|
||||||
|
let total = fs.readFileSync(DataFile, 'utf8')
|
||||||
|
console.log(total.length)
|
@ -9,7 +9,7 @@ let list = input.trim().replace(/[\r\n a-zA-Z0-9-_~!@#$%^&*\(\)<>?:\"\{\},\.\/;'
|
|||||||
list = Array.from(new Set(list.split(''))).sort((a, b) => a.localeCompare(b)).join('')
|
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')
|
fs.writeFileSync(path.join(__dirname, './output.txt'), list, 'utf8')
|
||||||
return
|
// return
|
||||||
|
|
||||||
for (let word of list) {
|
for (let word of list) {
|
||||||
// 汉字
|
// 汉字
|
||||||
|
Loading…
Reference in New Issue
Block a user