Socket
Socket
Sign inDemoInstall

cspell-trie-lib

Package Overview
Dependencies
Maintainers
1
Versions
286
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.1.6 to 4.1.7

15

dist/lib/convertToTrieRefNodes.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const TrieNode_1 = require("./TrieNode");
const gensequence_1 = require("gensequence");
const MinReferenceCount = 3;
/**

@@ -45,2 +47,8 @@ * An iterator that will emit TrieRefNodes mostly in descending frequency

}
function* walkByTallies(tallies) {
const nodes = [...gensequence_1.genSequence(tallies).filter(a => a[1] >= MinReferenceCount)].sort((a, b) => b[1] - a[1]);
for (const [n] of nodes) {
yield* walkByRollup(n);
}
}
function* walkByRollup(n) {

@@ -67,6 +75,9 @@ var _a;

}
function* walk(n) {
function* walk(root) {
cached.set(eow, count++);
yield convert(eow);
yield* walkByRollup(n);
// Emit the highest referenced nodes first.
yield* walkByTallies(tallies);
// Emit the rest.
yield* walkByRollup(root);
}

@@ -73,0 +84,0 @@ tally(root);

4

package.json
{
"name": "cspell-trie-lib",
"version": "4.1.6",
"version": "4.1.7",
"description": "Trie Data Structure to support cspell.",

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

},
"gitHead": "d3d97247b35d1c755ae6dc95cc72e4b8381b68f6"
"gitHead": "73f2223b8b222203c2e996d865564ef85fb67075"
}
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