hunspell-reader
Advanced tools
Comparing version 5.13.3 to 5.13.4
@@ -65,2 +65,4 @@ "use strict"; | ||
applyRulesToWord(affWord, remainingDepth) { | ||
var _a; | ||
const compoundMin = (_a = this.affInfo.COMPOUNDMIN) !== null && _a !== void 0 ? _a : 3; | ||
const { word, base, suffix, prefix, dic } = affWord; | ||
@@ -79,2 +81,3 @@ const allRules = this.getMatchingRules(affWord.rules); | ||
.filter(({ flags }) => !flags.isNeedAffix) | ||
.map((affWord) => adjustCompounding(affWord, compoundMin)) | ||
.map((affWord) => logAffWord(affWord, 'applyRulesToWord')); | ||
@@ -297,2 +300,10 @@ } | ||
} | ||
function adjustCompounding(affWord, minLength) { | ||
if (!affWord.flags.isCompoundPermitted || affWord.word.length >= minLength) { | ||
return affWord; | ||
} | ||
const { isCompoundPermitted, ...flags } = affWord.flags; | ||
affWord.flags = flags; | ||
return affWord; | ||
} | ||
//# sourceMappingURL=aff.js.map |
{ | ||
"name": "hunspell-reader", | ||
"version": "5.13.3", | ||
"version": "5.13.4", | ||
"description": "A library for reading Hunspell Dictionary Files", | ||
@@ -43,8 +43,8 @@ "bin": "bin.js", | ||
"@types/jest": "^27.0.3", | ||
"@types/node": "^16.11.10", | ||
"jest": "^27.4.0", | ||
"prettier": "^2.5.0", | ||
"@types/node": "^16.11.14", | ||
"jest": "^27.4.5", | ||
"prettier": "^2.5.1", | ||
"rimraf": "^3.0.2", | ||
"ts-jest": "^27.0.7", | ||
"typescript": "^4.5.2" | ||
"ts-jest": "^27.1.2", | ||
"typescript": "^4.5.4" | ||
}, | ||
@@ -76,3 +76,3 @@ "dependencies": { | ||
}, | ||
"gitHead": "f49cb2d98eed1f7274b1e6ad1ef076e7140347b5" | ||
"gitHead": "cf6ef9e6137af46d1a7ebd83600c05a4892c4814" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
57577
1434