@scrabble-solver/word-definitions 2.12.2 → 2.12.3
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.
|
@@ -15,7 +15,9 @@ const normalizeQuotes = (definition) => definition.replace(/\."/g, '".');
|
|
|
15
15
|
const normalizeMarkers = (definition) => definition.replace(/^\(\d+\.\d+\)\s+/g, '');
|
|
16
16
|
const normalizeTrailingSymbols = (definition) => definition.trim().replace(/:$/, '');
|
|
17
17
|
const normalizeLeadingSymbols = (definition) => definition.trim().replace(/^:/, '');
|
|
18
|
-
|
|
18
|
+
/**
|
|
19
|
+
* @see https://stackoverflow.com/a/40732368
|
|
20
|
+
*/
|
|
19
21
|
const normalizeNonWords = (definition) => (/[\w\u0621-\u064A]+/.test(definition) ? definition : '');
|
|
20
22
|
const normalizeCommas = (definition) => {
|
|
21
23
|
return definition
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scrabble-solver/word-definitions",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.3",
|
|
4
4
|
"description": "Scrabble Solver 2 - Word definitions",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"clean": "rimraf build/ node_modules/ package-lock.json"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@scrabble-solver/types": "^2.12.
|
|
26
|
+
"@scrabble-solver/types": "^2.12.3",
|
|
27
27
|
"cheerio": "^1.0.0-rc.12",
|
|
28
28
|
"follow-redirects": "^1.15.2",
|
|
29
29
|
"striptags": "^3.2.0"
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/follow-redirects": "^1.14.1"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "5400e276feee01557044e4e758b11e86b83fb085"
|
|
35
35
|
}
|
|
@@ -21,7 +21,9 @@ const normalizeTrailingSymbols: Normalize = (definition) => definition.trim().re
|
|
|
21
21
|
|
|
22
22
|
const normalizeLeadingSymbols: Normalize = (definition) => definition.trim().replace(/^:/, '');
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
/**
|
|
25
|
+
* @see https://stackoverflow.com/a/40732368
|
|
26
|
+
*/
|
|
25
27
|
const normalizeNonWords: Normalize = (definition) => (/[\w\u0621-\u064A]+/.test(definition) ? definition : '');
|
|
26
28
|
|
|
27
29
|
const normalizeCommas: Normalize = (definition) => {
|