JSPM

js-ds-collection

1.0.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6
  • Score
    100M100P100Q30744F
  • License MIT

A collection of clean, testable data structures in modern TypeScript

Package Exports

  • js-ds-collection

Readme

js-ds-collection

A lightweight, modular, and TypeScript-first collection of commonly used data structures in JavaScript, built for learning, practice, and production use.

npm version GitHub license


โœจ Features

  • ๐Ÿงฑ Classic data structures like Stack, Queue, LinkedList, Heap, Tree, Trie, Union-Find, Segment Tree
  • โšก Fully type-safe with TypeScript generics
  • ๐Ÿงช 100% unit-tested with Vitest
  • ๐Ÿ“ฆ Tree-shakable and ready for modern builds
  • ๐Ÿ“š Great for DSA practice, interviews, or educational use

๐Ÿ“ฆ Installation

npm install js-ds-collection

Data Structures table of Contents

Data Structure Description Docs / Examples
Stack<T> LIFO structure with iterable support ๐Ÿ“˜ Stack Docs
Queue<T> Optimized FIFO queue using circular buffer ๐Ÿ“˜ Queue Docs
Dequeue<T> Insert/remove from both ends ๐Ÿ“˜ Dequeue Docs
LinkedList<T> Singly linked list ๐Ÿ“˜ LinkedList Docs
DoublyLinkedList<T> Bi-directional linked list ๐Ÿ“˜ DoublyLinkedList Docs
CircularLinkedList<T> Circular linked list ๐Ÿ“˜ DoublyLinkedList Docs
Heap<T> Generic min/max heap via comparator ๐Ÿ“˜ Heap Docs
UnionFind Disjoint-set with union by rank/size ๐Ÿ“˜ UnionFind Docs
SegmentTree<T> Fast range queries and point updates ๐Ÿ“˜ SegmentTree Docs
Trie Prefix tree for string search ๐Ÿ“˜ Trie Docs