@justin/data-structures@0.3.0Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
Works with
•JSR Score100%•This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers




Publisheda year ago (0.3.0)
These data structures are created to fill some gaps in JavaScript's standard library with portability and simplicity in mind.
Data Structures
These data structures are created to fill some gaps in JavaScript's standard library.
They are created for coding challenges with the following goals:
- Simplicity
- Readability
- Portability
These data structures are easy to copy and paste into an editor for coding challenges in any coding environment. They are simple to use and only implement essential functionality. They are also simple enough to write from scratch if required.
import { Heap } from "@justin/data-structures"; import { assertEquals } from "@std/assert"; const minHeap = new Heap([3, 5, 4, 4, 3, 3, 2, 1, 2]); const actual = []; while (!minHeap.isEmpty()) { actual.push(minHeap.pop()); } assertEquals(actual, [1, 2, 2, 3, 3, 3, 4, 4, 5]);
Built and signed on
GitHub Actions
Add Package
deno add jsr:@justin/data-structures
Import symbol
import * as data_structures from "@justin/data-structures";
Import directly with a jsr specifier
import * as data_structures from "jsr:@justin/data-structures";
Add Package
pnpm i jsr:@justin/data-structures
pnpm dlx jsr add @justin/data-structures
Import symbol
import * as data_structures from "@justin/data-structures";
Add Package
yarn add jsr:@justin/data-structures
yarn dlx jsr add @justin/data-structures
Import symbol
import * as data_structures from "@justin/data-structures";
Add Package
vlt install jsr:@justin/data-structures
Import symbol
import * as data_structures from "@justin/data-structures";
Add Package
npx jsr add @justin/data-structures
Import symbol
import * as data_structures from "@justin/data-structures";
Add Package
bunx jsr add @justin/data-structures
Import symbol
import * as data_structures from "@justin/data-structures";