data-structure-typed 1.34.6 → 1.34.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file.
8
8
  - [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
9
9
  - [`auto-changelog`](https://github.com/CookPete/auto-changelog)
10
10
 
11
- ## [v1.34.6](https://github.com/zrwusa/data-structure-typed/compare/v1.34.1...main) (upcoming)
11
+ ## [v1.34.7](https://github.com/zrwusa/data-structure-typed/compare/v1.34.1...main) (upcoming)
12
12
 
13
13
  ## [v1.34.1](https://github.com/zrwusa/data-structure-typed/compare/v1.33.4...v1.34.1) (6 October 2023)
14
14
 
package/README.md CHANGED
@@ -6,13 +6,15 @@ Do you envy C++ with [std](), Python with [collections](), and Java with [java.u
6
6
 
7
7
  Now you can use this library in Node.js and browser environments in CommonJS(require export.modules = ), ESModule(import export), Typescript(import export), UMD(var Queue = dataStructureTyped.Queue)
8
8
 
9
- The size after packaging is 69 kB.
10
-
11
- ![License](https://img.shields.io/badge/License-MIT-blue.svg)
12
- ![Language](https://img.shields.io/github/languages/top/zrwusa/data-structure-typed)
13
- ![GitHub release (latest by date)](https://img.shields.io/github/v/release/zrwusa/data-structure-typed)
14
- ![npm](https://aleen42.github.io/badges/src/npm.svg)
9
+ ![NPM](https://img.shields.io/npm/l/data-structure-typed)
10
+ ![GitHub top language](https://img.shields.io/github/languages/top/zrwusa/data-structure-typed)
11
+ ![npm](https://img.shields.io/npm/dw/data-structure-typed)
15
12
  ![eslint](https://aleen42.github.io/badges/src/eslint.svg)
13
+ ![npm package minimized gzipped size (select exports)](https://img.shields.io/bundlejs/size/data-structure-typed)
14
+ ![npm bundle size](https://img.shields.io/bundlephobia/min/data-structure-typed)
15
+ ![npm](https://img.shields.io/npm/v/data-structure-typed)
16
+
17
+
16
18
 
17
19
  [//]: # (![Branches](https://img.shields.io/badge/branches-55.47%25-red.svg?style=flat))
18
20
 
@@ -424,6 +426,7 @@ Array.from(dijkstraResult?.seen ?? []).map(vertex => vertex.id) // ['A', 'B', 'D
424
426
 
425
427
  ### Standard library data structure comparison
426
428
 
429
+
427
430
  <table>
428
431
  <thead>
429
432
  <tr>
@@ -449,6 +452,13 @@ Array.from(dijkstraResult?.seen ?? []).map(vertex => vertex.id) // ['A', 'B', 'D
449
452
  <td>LinkedList&lt;E&gt;</td>
450
453
  <td>deque</td>
451
454
  </tr>
455
+ <tr>
456
+ <td>Singly Linked List</td>
457
+ <td>SinglyLinkedList&lt;E&gt;</td>
458
+ <td>-</td>
459
+ <td>-</td>
460
+ <td>-</td>
461
+ </tr>
452
462
  <tr>
453
463
  <td>Set</td>
454
464
  <td>Set&lt;E&gt;</td>
@@ -464,19 +474,13 @@ Array.from(dijkstraResult?.seen ?? []).map(vertex => vertex.id) // ['A', 'B', 'D
464
474
  <td>dict</td>
465
475
  </tr>
466
476
  <tr>
467
- <td>Unordered Set</td>
477
+ <td>Ordered Dictionary</td>
478
+ <td>Map&lt;K, V&gt;</td>
468
479
  <td>-</td>
469
- <td>unordered_set&lt;T&gt;</td>
470
- <td>HashSet&lt;E&gt;</td>
471
480
  <td>-</td>
481
+ <td>OrderedDict</td>
472
482
  </tr>
473
- <tr>
474
- <td>Unordered Map</td>
475
- <td>HashMap&lt;K, V&gt;</td>
476
- <td>unordered_map&lt;K, V&gt;</td>
477
- <td>HashMap&lt;K, V&gt;</td>
478
- <td>defaultdict</td>
479
- </tr>
483
+
480
484
  <tr>
481
485
  <td>Queue</td>
482
486
  <td>Queue&lt;E&gt;</td>
@@ -491,6 +495,13 @@ Array.from(dijkstraResult?.seen ?? []).map(vertex => vertex.id) // ['A', 'B', 'D
491
495
  <td>PriorityQueue&lt;E&gt;</td>
492
496
  <td>-</td>
493
497
  </tr>
498
+ <tr>
499
+ <td>Heap</td>
500
+ <td>Heap&lt;V&gt;</td>
501
+ <td>priority_queue&lt;T&gt;</td>
502
+ <td>PriorityQueue&lt;E&gt;</td>
503
+ <td>heapq</td>
504
+ </tr>
494
505
  <tr>
495
506
  <td>Stack</td>
496
507
  <td>Stack&lt;E&gt;</td>
@@ -499,19 +510,26 @@ Array.from(dijkstraResult?.seen ?? []).map(vertex => vertex.id) // ['A', 'B', 'D
499
510
  <td>-</td>
500
511
  </tr>
501
512
  <tr>
502
- <td>Bitset</td>
503
- <td>-</td>
504
- <td>bitset&lt;N&gt;</td>
513
+ <td>Deque</td>
514
+ <td>Deque&lt;E&gt;</td>
515
+ <td>deque&lt;T&gt;</td>
505
516
  <td>-</td>
506
517
  <td>-</td>
507
518
  </tr>
508
519
  <tr>
509
- <td>Deque</td>
510
- <td>Deque&lt;E&gt;</td>
511
- <td>deque&lt;T&gt;</td>
520
+ <td>Trie</td>
521
+ <td>Trie</td>
522
+ <td>-</td>
512
523
  <td>-</td>
513
524
  <td>-</td>
514
525
  </tr>
526
+ <tr>
527
+ <td>Unordered Map</td>
528
+ <td>HashMap&lt;K, V&gt;</td>
529
+ <td>unordered_map&lt;K, V&gt;</td>
530
+ <td>HashMap&lt;K, V&gt;</td>
531
+ <td>defaultdict</td>
532
+ </tr>
515
533
  <tr>
516
534
  <td>Multiset</td>
517
535
  <td>-</td>
@@ -527,18 +545,39 @@ Array.from(dijkstraResult?.seen ?? []).map(vertex => vertex.id) // ['A', 'B', 'D
527
545
  <td>-</td>
528
546
  </tr>
529
547
  <tr>
530
- <td>Unordered Multiset</td>
548
+ <td>Binary Tree</td>
549
+ <td>BinaryTree&lt;K, V&gt;</td>
550
+ <td>-</td>
531
551
  <td>-</td>
532
- <td>unordered_multiset</td>
533
- <td>Counter</td>
534
552
  <td>-</td>
535
553
  </tr>
536
554
  <tr>
537
- <td>Ordered Dictionary</td>
538
- <td>Map&lt;K, V&gt;</td>
555
+ <td>Binary Search Tree</td>
556
+ <td>BST&lt;K, V&gt;</td>
539
557
  <td>-</td>
540
558
  <td>-</td>
541
- <td>OrderedDict</td>
559
+ <td>-</td>
560
+ </tr>
561
+ <tr>
562
+ <td>Directed Graph</td>
563
+ <td>DirectedGraph&lt;V, E&gt;</td>
564
+ <td>-</td>
565
+ <td>-</td>
566
+ <td>-</td>
567
+ </tr>
568
+ <tr>
569
+ <td>Undirected Graph</td>
570
+ <td>UndirectedGraph&lt;V, E&gt;</td>
571
+ <td>-</td>
572
+ <td>-</td>
573
+ <td>-</td>
574
+ </tr>
575
+ <tr>
576
+ <td>Unordered Multiset</td>
577
+ <td>-</td>
578
+ <td>unordered_multiset</td>
579
+ <td>-</td>
580
+ <td>Counter</td>
542
581
  </tr>
543
582
  <tr>
544
583
  <td>Linked Hash Set</td>
@@ -576,24 +615,24 @@ Array.from(dijkstraResult?.seen ?? []).map(vertex => vertex.id) // ['A', 'B', 'D
576
615
  <td>-</td>
577
616
  </tr>
578
617
  <tr>
579
- <td>Persistent Collections</td>
580
- <td>-</td>
618
+ <td>Unordered Multimap</td>
581
619
  <td>-</td>
620
+ <td>unordered_multimap&lt;K, V&gt;</td>
582
621
  <td>-</td>
583
622
  <td>-</td>
584
623
  </tr>
585
624
  <tr>
586
- <td>unordered multiset</td>
625
+ <td>Bitset</td>
587
626
  <td>-</td>
588
- <td>unordered_multiset&lt;T&gt;</td>
627
+ <td>bitset&lt;N&gt;</td>
589
628
  <td>-</td>
590
629
  <td>-</td>
591
630
  </tr>
592
631
  <tr>
593
- <td>Unordered Multimap</td>
594
- <td>unordered_multimap&lt;K, V&gt;</td>
595
- <td>-</td>
632
+ <td>Unordered Set</td>
596
633
  <td>-</td>
634
+ <td>unordered_set&lt;T&gt;</td>
635
+ <td>HashSet&lt;E&gt;</td>
597
636
  <td>-</td>
598
637
  </tr>
599
638
  </tbody>
@@ -23,7 +23,7 @@ export declare class HeapItem<V = any> {
23
23
  get val(): V | null;
24
24
  set val(value: V | null);
25
25
  }
26
- export declare abstract class Heap<V = number> {
26
+ export declare abstract class Heap<V = any> {
27
27
  /**
28
28
  * The function is a constructor for a class that initializes a priority callback function based on the
29
29
  * options provided.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "data-structure-typed",
3
- "version": "1.34.6",
3
+ "version": "1.34.7",
4
4
  "description": "Data Structures of Javascript & TypeScript. Binary Tree, BST, Graph, Heap, Priority Queue, Linked List, Queue, Deque, Stack, AVL Tree, Tree Multiset, Trie, Directed Graph, Undirected Graph, Singly Linked List, Doubly Linked List, Max Heap, Max Priority Queue, Min Heap, Min Priority Queue.",
5
5
  "main": "dist/index.js",
6
6
  "module": "lib/index.js",
@@ -42,7 +42,7 @@ export class HeapItem<V = any> {
42
42
  }
43
43
  }
44
44
 
45
- export abstract class Heap<V = number> {
45
+ export abstract class Heap<V = any> {
46
46
  /**
47
47
  * The function is a constructor for a class that initializes a priority callback function based on the
48
48
  * options provided.