# datastructures-js

> production-ready data structures implementation in javascript & typescript.

Latest version **13.0.0** (published 2023-06-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install datastructures-js
pnpm add datastructures-js
yarn add datastructures-js
bun add datastructures-js
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 13.0.0 |
| Published | 2023-06-20 |
| First published | 2015-06-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 9.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 254 |
| Author | Eyas Ranjous |
| Maintainers | eyas-ranjous |
| Keywords | data structures typescript, es6 data structures, javascript data structures, data structures, data structures javascript, data structures js, stack, es6 stack, queue, es6 queue, priority queue, priorityqueue, set, linked list, linkedlist, doubly linked list, doublylinkedlist, binary search tree, avl tree, heap, min heap, max heap, trie, bst, graph, es6 graph, directed graph, directedgraph |

## Links

- npm: https://www.npmjs.com/package/datastructures-js
- Repository: https://github.com/datastructures-js/datastructures-js
- Homepage: https://github.com/datastructures-js/datastructures-js#readme
- Issues: https://github.com/datastructures-js/datastructures-js/issues
- npm.io page: https://npm.io/package/datastructures-js

## Dependencies (10)

- [@datastructures-js/set](https://npm.io/package/@datastructures-js/set.md) ^4.2.1
- [@datastructures-js/heap](https://npm.io/package/@datastructures-js/heap.md) ^4.3.2
- [@datastructures-js/trie](https://npm.io/package/@datastructures-js/trie.md) ^4.2.2
- [@datastructures-js/deque](https://npm.io/package/@datastructures-js/deque.md) ^1.0.4
- [@datastructures-js/graph](https://npm.io/package/@datastructures-js/graph.md) ^5.3.0
- [@datastructures-js/queue](https://npm.io/package/@datastructures-js/queue.md) ^4.2.3
- [@datastructures-js/stack](https://npm.io/package/@datastructures-js/stack.md) ^3.1.4
- [@datastructures-js/linked-list](https://npm.io/package/@datastructures-js/linked-list.md) ^6.1.0
- [@datastructures-js/priority-queue](https://npm.io/package/@datastructures-js/priority-queue.md) ^6.3.0
- [@datastructures-js/binary-search-tree](https://npm.io/package/@datastructures-js/binary-search-tree.md) ^5.3.1

## Alternatives

- [cron](https://npm.io/package/cron.md) — 4.9M weekly downloads
- [@vercel/queue](https://npm.io/package/@vercel/queue.md) — 731.6K weekly downloads
- [create-sonicjs](https://npm.io/package/create-sonicjs.md) — 1.6K weekly downloads
- [@exellix/jobs-api](https://npm.io/package/@exellix/jobs-api.md) — 941 weekly downloads
- [@forwardimpact/libskill](https://npm.io/package/@forwardimpact/libskill.md) — 575 weekly downloads

## Recent versions

- 13.0.0 (latest) — 2023-06-20
- 12.0.0 — 2022-07-20
- 11.0.0 — 2022-07-14
- 10.2.0 — 2022-01-28
- 10.1.1 — 2021-06-20
- 10.1.0 — 2021-06-20
- 10.0.0 — 2021-04-15
- 9.0.0 — 2020-12-19
- 8.1.0 — 2020-05-02
- 8.0.0 — 2020-04-13
- 7.0.3 — 2020-04-11
- 7.0.2 — 2020-04-10
- 7.0.1 — 2020-04-10
- 7.0.0 — 2020-04-01
- 6.0.2 — 2018-10-06
- … 42 more at https://npm.io/package/datastructures-js/versions

## README

<img width="410" src="https://user-images.githubusercontent.com/6517308/79055948-c84f8200-7c16-11ea-9a9e-be952f13ba45.jpg" />

[![npm](https://img.shields.io/npm/v/datastructures-js.svg)](https://www.npmjs.com/package/datastructures-js)
[![npm](https://img.shields.io/npm/dm/datastructures-js.svg)](https://www.npmjs.com/package/datastructures-js) [![npm](https://img.shields.io/badge/node-%3E=%206.0-blue.svg)](https://www.npmjs.com/package/datastructures-js)

consolidates all data structures <a href="https://github.com/datastructures-js">@datastructures-js</a> into a single repository.

<img src="https://user-images.githubusercontent.com/6517308/121813242-859a9700-cc6b-11eb-99c0-49e5bb63005b.jpg">

## install
```sh
npm install --save datastructures-js
```

### require
```js
const {
  Stack,
  Queue,
  Deque,
  EnhancedSet,
  LinkedList, LinkedListNode, DoublyLinkedList, DoublyLinkedListNode,
  Heap, MinHeap, MaxHeap,
  PriorityQueue, MinPriorityQueue, MaxPriorityQueue,
  BinarySearchTree, BinarySearchTreeNode, AvlTree, AvlTreeNode,
  Trie, TrieNode,
  Graph, DirectedGraph,
} = require('datastructures-js');
```

### import
```js
import {
  Stack,
  Queue,
  Deque,
  EnhancedSet,
  LinkedList, LinkedListNode, DoublyLinkedList, DoublyLinkedListNode,
  Heap, MinHeap, MaxHeap,
  PriorityQueue, MinPriorityQueue, MaxPriorityQueue,
  BinarySearchTree, BinarySearchTreeNode, AvlTree, AvlTreeNode,
  Trie, TrieNode,
  Graph, DirectedGraph,
} from 'datastructures-js';
```

### extend
Data structures are implemented as ES6 classes (with types definitions) for general purposes. They can be extended for additional functionality and custom requirements.

```js
const { Graph } = require('datastructures-js'); // OR require('@datastructures-js/graph')

class CustomGraph extends Graph {
  findShortestPath(pointA, pointB) {
    // more code
  }
}
```

## Build
```
grunt build
```

## License
The MIT License. Full License is [here](https://github.com/datastructures-js/datastructures-js/blob/master/LICENSE)

---
_Source: https://npm.io/package/datastructures-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
