cspell-dictionary
Advanced tools
Comparing version 6.23.1 to 6.24.0
@@ -22,3 +22,3 @@ import type { DictionaryInformation, ReplaceMap } from '@cspell/cspell-types'; | ||
*/ | ||
compoundMethod?: CompoundWordsMethod; | ||
compoundMethod?: CompoundWordsMethod | undefined; | ||
/** | ||
@@ -28,11 +28,11 @@ * The limit on the number of suggestions to generate. If `allowTies` is true, it is possible | ||
*/ | ||
numSuggestions?: number; | ||
numSuggestions?: number | undefined; | ||
/** | ||
* Max number of changes / edits to the word to get to a suggestion matching suggestion. | ||
*/ | ||
numChanges?: number; | ||
numChanges?: number | undefined; | ||
/** | ||
* Allow for case-ingestive checking. | ||
*/ | ||
ignoreCase?: boolean; | ||
ignoreCase?: boolean | undefined; | ||
/** | ||
@@ -43,7 +43,7 @@ * If multiple suggestions have the same edit / change "cost", then included them even if | ||
*/ | ||
includeTies?: boolean; | ||
includeTies?: boolean | undefined; | ||
/** | ||
* Maximum amount of time to allow for generating suggestions. | ||
*/ | ||
timeout?: number; | ||
timeout?: number | undefined; | ||
} | ||
@@ -50,0 +50,0 @@ export type FindOptions = SearchOptions; |
@@ -29,3 +29,2 @@ "use strict"; | ||
const gensequence_1 = require("gensequence"); | ||
const clean_1 = require("../util/clean"); | ||
const util_1 = require("../util/util"); | ||
@@ -83,3 +82,3 @@ const Defaults = __importStar(require("./defaults")); | ||
}; | ||
const collector = (0, SpellingDictionaryMethods_1.suggestionCollector)(word, (0, clean_1.clean)({ | ||
const collectorOptions = { | ||
numSuggestions, | ||
@@ -91,3 +90,4 @@ filter, | ||
timeout, | ||
})); | ||
}; | ||
const collector = (0, SpellingDictionaryMethods_1.suggestionCollector)(word, collectorOptions); | ||
this.genSuggestions(collector, suggestOptions); | ||
@@ -94,0 +94,0 @@ return collector.suggestions.map((r) => ({ ...r, word: r.word })); |
@@ -5,3 +5,2 @@ "use strict"; | ||
const cspell_trie_lib_1 = require("cspell-trie-lib"); | ||
const clean_1 = require("../util/clean"); | ||
const text_1 = require("../util/text"); | ||
@@ -94,3 +93,3 @@ var cspell_trie_lib_2 = require("cspell-trie-lib"); | ||
? options | ||
: (0, clean_1.clean)({ | ||
: { | ||
numSuggestions: options, | ||
@@ -100,5 +99,3 @@ compoundMethod, | ||
ignoreCase, | ||
includeTies: undefined, | ||
timeout: undefined, | ||
}); | ||
}; | ||
return suggestOptions; | ||
@@ -105,0 +102,0 @@ } |
{ | ||
"name": "cspell-dictionary", | ||
"version": "6.23.1", | ||
"version": "6.24.0", | ||
"description": "A spelling dictionary library useful for checking words and getting suggestions.", | ||
@@ -46,9 +46,9 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@cspell/cspell-pipe": "6.23.1", | ||
"@cspell/cspell-types": "6.23.1", | ||
"cspell-trie-lib": "6.23.1", | ||
"@cspell/cspell-pipe": "6.24.0", | ||
"@cspell/cspell-types": "6.24.0", | ||
"cspell-trie-lib": "6.24.0", | ||
"fast-equals": "^4.0.3", | ||
"gensequence": "^4.0.3" | ||
}, | ||
"gitHead": "dace8b0625beb2766565f47bc813dc0a45480dc0" | ||
"gitHead": "0d1e8bf9426cd0bfb814df4f61da12d8aee57ddd" | ||
} |
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
94566
2194
+ Added@cspell/cspell-pipe@6.24.0(transitive)
+ Added@cspell/cspell-types@6.24.0(transitive)
+ Addedcspell-trie-lib@6.24.0(transitive)
- Removed@cspell/cspell-pipe@6.23.1(transitive)
- Removed@cspell/cspell-types@6.23.1(transitive)
- Removedcspell-trie-lib@6.23.1(transitive)
Updated@cspell/cspell-pipe@6.24.0
Updated@cspell/cspell-types@6.24.0
Updatedcspell-trie-lib@6.24.0