Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cspell-trie-lib

Package Overview
Dependencies
Maintainers
1
Versions
295
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cspell-trie-lib - npm Package Compare versions

Comparing version 4.0.9 to 4.0.10

2

dist/lib/suggest.d.ts

@@ -32,2 +32,2 @@ import { TrieNode } from './TrieNode';

}
export declare function suggestionCollector(word: string, maxNumSuggestions: number, filter?: (word: string) => boolean, changeLimit?: number): SuggestionCollector;
export declare function suggestionCollector(wordToMatch: string, maxNumSuggestions: number, filter?: (word: string) => boolean, changeLimit?: number): SuggestionCollector;

@@ -174,5 +174,5 @@ "use strict";

exports.compSuggestionResults = compSuggestionResults;
function suggestionCollector(word, maxNumSuggestions, filter = () => true, changeLimit = maxNumChanges) {
function suggestionCollector(wordToMatch, maxNumSuggestions, filter = () => true, changeLimit = maxNumChanges) {
const sugs = new Map();
let maxCost = Math.min(baseCost * word.length / 2, baseCost * changeLimit);
let maxCost = Math.min(baseCost * wordToMatch.length / 2, baseCost * changeLimit);
function dropMax() {

@@ -225,3 +225,3 @@ if (sugs.size < 2) {

get maxCost() { return maxCost; },
get word() { return word; },
get word() { return wordToMatch; },
get maxNumSuggestions() { return maxNumSuggestions; },

@@ -228,0 +228,0 @@ };

{
"name": "cspell-trie-lib",
"version": "4.0.9",
"version": "4.0.10",
"description": "Trie Data Structure to support cspell.",

@@ -60,3 +60,3 @@ "main": "dist/index.js",

},
"gitHead": "a889d1ac70724471454a4189f4082f3af4971074"
"gitHead": "d2bbe5704b69a738731a3761d521418c6dd0641d"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc