Skip to main content
Home

Built and signed on GitHub Actions

Works with
This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score100%
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

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@justin/data-structures

Import symbol

import * as data_structures from "@justin/data-structures";
or

Import directly with a jsr specifier

import * as data_structures from "jsr:@justin/data-structures";

Add Package

pnpm i jsr:@justin/data-structures
or (using pnpm 10.8 or older)
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
or (using Yarn 4.8 or older)
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";