90 Best JavaScript Data Structures Libraries

Curated by the Openbase team and community.Learn more

Curated by the Openbase team and community. Learn more

immer

Create the next immutable state by mutating the current one

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User Rating
4.7/ 5
53
Top Feedback
great-docs
16Great Documentation
easy-to-use
16Easy to Use
performant
11Performant
GitHub Stars
Github Icon
21K
Weekly Downloads
Weekly Downloads Icon
7M
Last Commit
14d ago
Bundle Size (min+gzip)
N/A
Tree-Shakeable

immutable

Immutable persistent data collections for Javascript which increase efficiency and simplicity.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User Rating
4.4/ 5
47
Top Feedback
great-docs
11Great Documentation
performant
6Performant
easy-to-use
5Easy to Use
GitHub Stars
Github Icon
31K
Weekly Downloads
Weekly Downloads Icon
4M
Last Commit
5d ago
Bundle Size (min+gzip)
N/A
Tree-Shakeable
yal

yallist

Yet Another Linked List

License Icon
License: ISC
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User Rating
4.5/ 5
2
Top Feedback
great-docs
1Great Documentation
easy-to-use
1Easy to Use
GitHub Stars
Github Icon
160
Weekly Downloads
Weekly Downloads Icon
47M
Last Commit
2y ago
Bundle Size (min+gzip)
1.42KB
Not Tree-Shakeable

immutable-ext

This repository is moving to: https://github.com/npm/cli

License Icon
License: ISC
TypeScript Icon
TypeScript Definitions: Not Found
User Rating
4.7/ 5
6
Top Feedback
N/A
GitHub Stars
Github Icon
17K
Weekly Downloads
Weekly Downloads Icon
19K
Last Commit
1y ago
Bundle Size (min+gzip)
0.46KB
Not Tree-Shakeable
tm

tree-model

Manipulate and traverse tree-like structures in javascript.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User Rating
5.0/ 5
1
Top Feedback
N/A
GitHub Stars
Github Icon
818
Weekly Downloads
Weekly Downloads Icon
14K
Last Commit
3y ago
Bundle Size (min+gzip)
1.44KB
Not Tree-Shakeable
dj

dsa.js

๐ŸฅžData Structures and Algorithms explained and implemented in JavaScript + eBook

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Not Found
User Rating
4.0/ 5
1
Top Feedback
easy-to-use
1Easy to Use
GitHub Stars
Github Icon
6K
Weekly Downloads
Weekly Downloads Icon
35
Last Commit
2mo ago
Bundle Size (min+gzip)
N/A
Not Tree-Shakeable
ng

ngraph.graph

Graph data structure in JavaScript

License Icon
License: BSD-3-Clause
TypeScript Icon
TypeScript Definitions: Not Found
User Rating
3.0/ 5
2
Top Feedback
performant
1Performant
hard-to-use
1Hard to Use
GitHub Stars
Github Icon
319
Weekly Downloads
Weekly Downloads Icon
8K
Last Commit
19d ago
Bundle Size (min+gzip)
1.82KB
Not Tree-Shakeable
alg

algorithms

Atwood's Law applied to CS101 - Classic algorithms and data structures implemented in JavaScript

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Not Found
User Rating
5.0/ 5
1
Top Feedback
N/A
GitHub Stars
Github Icon
3K
Weekly Downloads
Weekly Downloads Icon
33
Last Commit
2y ago
Bundle Size (min+gzip)
9.8KB
Not Tree-Shakeable
mne

mnemonist

Curated collection of data structures for the JavaScript/TypeScript language.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User Rating
N/A
Top Feedback
responsive-maintainers
1Responsive Maintainers
GitHub Stars
Github Icon
2K
Weekly Downloads
Weekly Downloads Icon
206K
Last Commit
2mo ago
Bundle Size (min+gzip)
21.8KB
Not Tree-Shakeable

graphlib

โ›” [DEPRECATED] - A directed multi-graph library for JavaScript

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
1K
Weekly Downloads
Weekly Downloads Icon
1M
Last Commit
18d ago
Bundle Size (min+gzip)
12.4KB
Not Tree-Shakeable
frb

functional-red-black-tree

A purely functional red-black tree data structure

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
310
Weekly Downloads
Weekly Downloads Icon
14M
Last Commit
3y ago
Bundle Size (min+gzip)
2.43KB
Not Tree-Shakeable
ll

linked-list

Minimalistic linked lists

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User Rating
N/A
Top Feedback
easy-to-use
1Easy to Use
GitHub Stars
Github Icon
61
Weekly Downloads
Weekly Downloads Icon
73K
Last Commit
14d ago
Bundle Size (min+gzip)
0.79KB
Not Tree-Shakeable
spl

splaytree

Fast splay-tree data structure

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
83
Weekly Downloads
Weekly Downloads Icon
117K
Last Commit
1mo ago
Bundle Size (min+gzip)
2.08KB
Tree-Shakeable
hj

heap-js

Efficient Binary heap (priority queue, binary tree) data structure for JavaScript / TypeScript. Includes JavaScript methods, Python's heapq module methods, and Java's PriorityQueue methods.

License Icon
License: BSD-3-Clause
TypeScript Icon
TypeScript Definitions: Built-In
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
36
Weekly Downloads
Weekly Downloads Icon
2K
Last Commit
16d ago
Bundle Size (min+gzip)
N/A
Tree-Shakeable
ts

trie-search

A trie implementation that maps keys to objects. Most common use will be for typeahead searches.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Not Found
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
126
Weekly Downloads
Weekly Downloads Icon
7K
Last Commit
3mo ago
Bundle Size (min+gzip)
3.80KB
Not Tree-Shakeable
opi

object-path-immutable

Modify deep object properties without modifying the original object (immutability). Works great with React and Redux.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
376
Weekly Downloads
Weekly Downloads Icon
52K
Last Commit
4mo ago
Bundle Size (min+gzip)
2.20KB
Tree-Shakeable
hea

heap

A binary heap implementation in CoffeeScript/JavaScript.

License Icon
License: Unknown
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
105
Weekly Downloads
Weekly Downloads Icon
703K
Last Commit
6y ago
Bundle Size (min+gzip)
1.20KB
Not Tree-Shakeable

@datastructures-js/trie

Trie data structure implementation in javascript

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Not Found
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
7
Weekly Downloads
Weekly Downloads Icon
958
Last Commit
1mo ago
Bundle Size (min+gzip)
N/A
Not Tree-Shakeable
jds

js-data-structs

A small data structures library for JavaScript

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Not Found
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
5
Weekly Downloads
Weekly Downloads Icon
152
Last Commit
10mo ago
Bundle Size (min+gzip)
3.30KB
Tree-Shakeable
si

seamless-immutable

Immutable data structures for JavaScript which are backwards-compatible with normal JS Arrays and Objects.

License Icon
License: BSD-3-Clause
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
5K
Weekly Downloads
Weekly Downloads Icon
410K
Last Commit
3y ago
Bundle Size (min+gzip)
2.72KB
Not Tree-Shakeable
gfj

graphs-for-js

Implementations of graph data structures for JavaScript and TypeScript

License Icon
License: ISC
TypeScript Icon
TypeScript Definitions: Built-In
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
1
Weekly Downloads
Weekly Downloads Icon
19
Last Commit
8mo ago
Bundle Size (min+gzip)
9.8KB
Not Tree-Shakeable
dat

datascript

Immutable database and Datalog query engine for Clojure, ClojureScript and JS

License Icon
License: Unknown
TypeScript Icon
TypeScript Definitions: Not Found
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
4K
Weekly Downloads
Weekly Downloads Icon
249
Last Commit
11d ago
Bundle Size (min+gzip)
N/A
Not Tree-Shakeable

graph-data-structure

A graph data structure with topological sort and shortest path algorithms.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Not Found
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
168
Weekly Downloads
Weekly Downloads Icon
974
Last Commit
2mo ago
Bundle Size (min+gzip)
N/A
Not Tree-Shakeable
bao

baobab

JavaScript & TypeScript persistent and optionally immutable data tree with cursors.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Not Found
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
3K
Weekly Downloads
Weekly Downloads Icon
5K
Last Commit
6mo ago
Bundle Size (min+gzip)
9.51KB
Not Tree-Shakeable
dj

datastructures-js

๐Ÿ”ต data structures implementation in javascript & typescript.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Not Found
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
119
Weekly Downloads
Weekly Downloads Icon
131
Last Commit
1mo ago
Bundle Size (min+gzip)
N/A
Not Tree-Shakeable
tn

trie-node

A trie implementation for NodeJS

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Not Found
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
0
Weekly Downloads
Weekly Downloads Icon
22
Last Commit
21d ago
Bundle Size (min+gzip)
0.35KB
Not Tree-Shakeable

node-interval-tree

An Interval Tree data structure.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
56
Weekly Downloads
Weekly Downloads Icon
27K
Last Commit
4y ago
Bundle Size (min+gzip)
2.14KB
Not Tree-Shakeable
id

immutable-devtools

Chrome Dev Tools custom formatter for Immutable-js values

License Icon
License: BSD-2-Clause
TypeScript Icon
TypeScript Definitions: Not Found
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
636
Weekly Downloads
Weekly Downloads Icon
24K
Last Commit
2y ago
Bundle Size (min+gzip)
1.46KB
Not Tree-Shakeable
att

array-to-tree

Convert a plain array of nodes (with pointers to parent nodes) to a nested data structure

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Not Found
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
148
Weekly Downloads
Weekly Downloads Icon
11K
Last Commit
2y ago
Bundle Size (min+gzip)
5.12KB
Not Tree-Shakeable

@supercharge/queue-datastructure

A queue data structure for Node.js

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
2
Weekly Downloads
Weekly Downloads Icon
65
Last Commit
19d ago
Bundle Size (min+gzip)
0.43KB
Not Tree-Shakeable
dll

dbly-linked-list

Javascript implementation of a doubly linked list data structure.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Not Found
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
24
Weekly Downloads
Weekly Downloads Icon
6K
Last Commit
2y ago
Bundle Size (min+gzip)
4.87KB
Not Tree-Shakeable
pon

pondjs

A timeseries library build on top of immutable.js

License Icon
License: BSD-3-Clause-LBNL
TypeScript Icon
TypeScript Definitions: Built-In
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
0
Weekly Downloads
Weekly Downloads Icon
6K
Last Commit
N/A
Bundle Size (min+gzip)
109.6KB
Not Tree-Shakeable
og

open-graph

An Open Graph implementation for Node.js.

License Icon
License: BSD-2-Clause
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
65
Weekly Downloads
Weekly Downloads Icon
2K
Last Commit
2y ago
Bundle Size (min+gzip)
234.6KB
Not Tree-Shakeable
sh

simple-hashtable

Javascript implementation of a simple hash table data structure

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Not Found
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
2
Weekly Downloads
Weekly Downloads Icon
100
Last Commit
1y ago
Bundle Size (min+gzip)
5.95KB
Not Tree-Shakeable

typed-immutable

Immutable and structurally typed data

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Not Found
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
263
Weekly Downloads
Weekly Downloads Icon
1K
Last Commit
4y ago
Bundle Size (min+gzip)
21.7KB
Not Tree-Shakeable
tre

treeish

An array to tree generator utility.

License Icon
License: ISC
TypeScript Icon
TypeScript Definitions: Not Found
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
1
Weekly Downloads
Weekly Downloads Icon
23
Last Commit
1y ago
Bundle Size (min+gzip)
1.37KB
Not Tree-Shakeable
td

trie-d

Ready to use trie datastructure

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Not Found
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
1
Weekly Downloads
Weekly Downloads Icon
1K
Last Commit
3y ago
Bundle Size (min+gzip)
25.5KB
Not Tree-Shakeable
btm

backbone-tree-model

Tree data structure using Backbone Model and Collection

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Not Found
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
38
Weekly Downloads
Weekly Downloads Icon
777
Last Commit
3y ago
Bundle Size (min+gzip)
1.30KB
Not Tree-Shakeable
it

immutable-treeutils

Functional tree traversal helpers for ImmutableJS data structures

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Not Found
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
66
Weekly Downloads
Weekly Downloads Icon
591
Last Commit
1y ago
Bundle Size (min+gzip)
1.24KB
Not Tree-Shakeable
tre

treeize

Converts row data (in JSON/associative array format) to tree structure based on column naming conventions.

License Icon
License: Unknown
TypeScript Icon
TypeScript Definitions: Not Found
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
173
Weekly Downloads
Weekly Downloads Icon
553
Last Commit
2mo ago
Bundle Size (min+gzip)
29.6KB
Not Tree-Shakeable
cor

@nano-sql/core

Universal database layer for the client, server & mobile devices. It's like Lego for databases.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
691
Weekly Downloads
Weekly Downloads Icon
515
Last Commit
2y ago
Bundle Size (min+gzip)
32.1KB
Not Tree-Shakeable
dsj

dsjslib

A library implementing several standard data structures and utilities, in JavaScript. Its written and tested using Node.js which is the target platform.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Not Found
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
722
Weekly Downloads
Weekly Downloads Icon
390
Last Commit
4y ago
Bundle Size (min+gzip)
9.09KB
Not Tree-Shakeable
mul

multikeymap

A multi-key hash table for JavaScript.

License Icon
License: Unknown
TypeScript Icon
TypeScript Definitions: Not Found
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
10
Weekly Downloads
Weekly Downloads Icon
326
Last Commit
4y ago
Bundle Size (min+gzip)
1.09KB
Not Tree-Shakeable
nss

node-shared-structures

Implementations of a few basic data structures on top of SharedArrayBuffer for Node.js

License Icon
License: GPL-3.0-or-later
TypeScript Icon
TypeScript Definitions: Built-In
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
0
Weekly Downloads
Weekly Downloads Icon
14
Last Commit
8mo ago
Bundle Size (min+gzip)
N/A
Not Tree-Shakeable
lea

leakage

๐Ÿ› Memory leak testing for node.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
2K
Weekly Downloads
Weekly Downloads Icon
50
Last Commit
3mo ago
Bundle Size (min+gzip)
4.69KB
Not Tree-Shakeable
tre

tree

JavaScript library for creating and manipulating hierarchical tree structures.

License Icon
License: Unknown
TypeScript Icon
TypeScript Definitions: Not Found
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
23
Weekly Downloads
Weekly Downloads Icon
307
Last Commit
6y ago
Bundle Size (min+gzip)
8.61KB
Not Tree-Shakeable
jsh

jshashtable

Port of jshashtable as nodejs package. jshashtable is a standalone implementation of hash table in JavaScript. It associates keys with values, and allows any object to be used as the key (unlike JavaScript's built-in Object, which only allows strings as property names).

License Icon
License: Apache-2.0
TypeScript Icon
TypeScript Definitions: Not Found
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
4
Weekly Downloads
Weekly Downloads Icon
303
Last Commit
6y ago
Bundle Size (min+gzip)
N/A
Not Tree-Shakeable

collectable

High-performance immutable data structures for modern JavaScript and TypeScript applications. Functional interfaces, deep/composite operations API, mixed mutability API, TypeScript definitions, ES2015 module exports.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
233
Weekly Downloads
Weekly Downloads Icon
88
Last Commit
23d ago
Bundle Size (min+gzip)
N/A
Tree-Shakeable
bj

buckets-js

A complete, fully tested and documented data structure library written in pure JavaScript.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Not Found
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
1K
Weekly Downloads
Weekly Downloads Icon
189
Last Commit
1y ago
Bundle Size (min+gzip)
3.68KB
Not Tree-Shakeable
ns

nano-sql

Universal database layer for the client, server & mobile devices. It's like Lego for databases.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User Rating
N/A
Top Feedback
N/A
GitHub Stars
Github Icon
691
Weekly Downloads
Weekly Downloads Icon
154
Last Commit
2y ago
Bundle Size (min+gzip)
32.9KB
Not Tree-Shakeable