Socket
Socket
Sign inDemoInstall

data-structure-typed

Package Overview
Dependencies
Maintainers
0
Versions
201
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

data-structure-typed - npm Package Compare versions

Comparing version 1.52.2 to 1.52.3

6

CHANGELOG.md

@@ -11,4 +11,8 @@ # Changelog

## [v1.52.2](https://github.com/zrwusa/data-structure-typed/compare/v1.51.5...main) (upcoming)
## [v1.52.3](https://github.com/zrwusa/data-structure-typed/compare/v1.51.5...main) (upcoming)
### Changes
- fix(trie): trie returns invalid string when only the fist character m… [`#94`](https://github.com/zrwusa/data-structure-typed/pull/94)
## [v1.51.5](https://github.com/zrwusa/data-structure-typed/compare/v1.35.0...v1.51.5) (18 January 2024)

@@ -15,0 +19,0 @@

@@ -421,4 +421,9 @@ "use strict";

const nodeC = startNode.children.get(c);
if (nodeC)
if (nodeC) {
startNode = nodeC;
}
else {
// Early return if the whole prefix is not found
return [];
}
}

@@ -425,0 +430,0 @@ }

@@ -420,4 +420,9 @@ import { IterableElementBase } from '../base';

const nodeC = startNode.children.get(c);
if (nodeC)
if (nodeC) {
startNode = nodeC;
}
else {
// Early return if the whole prefix is not found
return [];
}
}

@@ -424,0 +429,0 @@ }

12

package.json
{
"name": "data-structure-typed",
"version": "1.52.2",
"version": "1.52.3",
"description": "Javascript Data Structure. Heap, Binary Tree, Red Black Tree, Linked List, Deque, Trie, HashMap, Directed Graph, Undirected Graph, Binary Search Tree(BST), AVL Tree, Priority Queue, Graph, Queue, Tree Multiset, Singly Linked List, Doubly Linked List, Max Heap, Max Priority Queue, Min Heap, Min Priority Queue, Stack. Benchmark compared with C++ STL. API aligned with ES6 and Java.util. Usability is comparable to Python",

@@ -69,7 +69,7 @@ "main": "dist/cjs/index.js",

"auto-changelog": "^2.4.0",
"avl-tree-typed": "^1.52.1",
"avl-tree-typed": "^1.52.2",
"benchmark": "^2.1.4",
"binary-tree-typed": "^1.52.1",
"bst-typed": "^1.52.1",
"data-structure-typed": "^1.52.1",
"binary-tree-typed": "^1.52.2",
"bst-typed": "^1.52.2",
"data-structure-typed": "^1.52.2",
"dependency-cruiser": "^14.1.0",

@@ -83,3 +83,3 @@ "doctoc": "^2.2.1",

"fast-glob": "^3.3.1",
"heap-typed": "^1.52.1",
"heap-typed": "^1.52.2",
"istanbul-badges-readme": "^1.8.5",

@@ -86,0 +86,0 @@ "jest": "^29.7.0",

@@ -457,3 +457,8 @@ /**

const nodeC = startNode.children.get(c);
if (nodeC) startNode = nodeC;
if (nodeC) {
startNode = nodeC;
} else {
// Early return if the whole prefix is not found
return [];
}
}

@@ -460,0 +465,0 @@ }

@@ -839,2 +839,18 @@ import { Trie, TrieNode } from '../../../../src';

it('Get no words when prefix not found, with no match from the first character', () => {
trie.add('apple');
trie.add('appetizer');
trie.add('banana');
const words = trie.getWords('cd');
expect(words).toEqual([]);
});
it('Get no words when prefix not found, with no match from the second character', () => {
trie.add('apple');
trie.add('appetizer');
trie.add('banana');
const words = trie.getWords('ab');
expect(words).toEqual([]);
});
it('Tree Height', () => {

@@ -841,0 +857,0 @@ trie.add('apple');

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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