@scrabble-solver/word-lists 2.8.5 → 2.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const lib_1 = require("./lib");
4
- const FILE_URL = 'https://raw.githubusercontent.com/HanSolo80/German-Dictionary/master/dictionary.txt';
4
+ const FILE_URL = 'https://raw.githubusercontent.com/enz/german-wordlist/master/words';
5
5
  const getDeDeWordList = async () => {
6
6
  return (0, lib_1.getTxtWordList)(FILE_URL);
7
7
  };
@@ -7,7 +7,10 @@ const findFirstWordIndex_1 = __importDefault(require("./findFirstWordIndex"));
7
7
  const extractWords = (file) => {
8
8
  const lines = file.replace(/\r/g, '').split('\n');
9
9
  const firstWordIndex = (0, findFirstWordIndex_1.default)(lines);
10
- const words = lines.slice(firstWordIndex).filter(Boolean);
10
+ const words = lines
11
+ .slice(firstWordIndex)
12
+ .filter((word) => word.trim().length > 0)
13
+ .map((word) => word.toLocaleLowerCase());
11
14
  return words;
12
15
  };
13
16
  exports.default = extractWords;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scrabble-solver/word-lists",
3
- "version": "2.8.5",
3
+ "version": "2.8.6",
4
4
  "description": "Scrabble Solver 2 - Word lists",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -24,7 +24,7 @@
24
24
  "clean:force": "npm run clean && rimraf package-lock.json"
25
25
  },
26
26
  "dependencies": {
27
- "@scrabble-solver/types": "^2.8.5",
27
+ "@scrabble-solver/types": "^2.8.6",
28
28
  "cheerio": "^1.0.0-rc.12",
29
29
  "follow-redirects": "^1.15.2",
30
30
  "memfs": "^3.4.7",
@@ -34,5 +34,5 @@
34
34
  "@types/follow-redirects": "^1.14.1",
35
35
  "@types/unzipper": "^0.10.5"
36
36
  },
37
- "gitHead": "79ba3664458e7dc8d805599a3cf3cd1faba86309"
37
+ "gitHead": "ec130aa77ac64b91ab82e79f130eb69ac561fffa"
38
38
  }
@@ -1,6 +1,6 @@
1
1
  import { getTxtWordList } from './lib';
2
2
 
3
- const FILE_URL = 'https://raw.githubusercontent.com/HanSolo80/German-Dictionary/master/dictionary.txt';
3
+ const FILE_URL = 'https://raw.githubusercontent.com/enz/german-wordlist/master/words';
4
4
 
5
5
  const getDeDeWordList = async (): Promise<string[]> => {
6
6
  return getTxtWordList(FILE_URL);
@@ -3,7 +3,10 @@ import findFirstWordIndex from './findFirstWordIndex';
3
3
  const extractWords = (file: string): string[] => {
4
4
  const lines = file.replace(/\r/g, '').split('\n');
5
5
  const firstWordIndex = findFirstWordIndex(lines);
6
- const words = lines.slice(firstWordIndex).filter(Boolean);
6
+ const words = lines
7
+ .slice(firstWordIndex)
8
+ .filter((word) => word.trim().length > 0)
9
+ .map((word) => word.toLocaleLowerCase());
7
10
  return words;
8
11
  };
9
12