We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5841080 commit cad9721Copy full SHA for cad9721
src/renderer/lib/password.ts
@@ -1,4 +1,4 @@
1
-import wordsListPath from "word-list";
+const wordList: typeof import("word-list") = require("word-list");
2
3
const fs: typeof import("fs") = require("node:fs");
4
const crypto: typeof import("crypto") = require("node:crypto");
@@ -21,6 +21,7 @@ function getRandomWordFrom(words: string[]) {
21
}
22
23
export function readWordList(): string[] {
24
- const wordArray = fs.readFileSync(wordsListPath, "utf8").split("\n");
+ const wordArray = fs.readFileSync(wordList.default, "utf8").split("\n");
25
+ console.log(wordArray.filter(word => word.length >= 5).length);
26
return wordArray.filter(word => word.length >= 5);
27
0 commit comments