# collect-your-stuff

> Use a variety of collections to collect your stuff when building code.

Latest version **2.4.0** (published 2026-11-04) · GNU license · 0 weekly downloads

## Install

```sh
npm install collect-your-stuff
pnpm add collect-your-stuff
yarn add collect-your-stuff
bun add collect-your-stuff
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 2.4.0 |
| Published | 2026-11-04 |
| First published | 2023-10-29 |
| Weekly downloads | 0 |
| License | GNU |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 434.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 0 |
| Author | Joshua Heagle |
| Maintainers | jheagle |
| Keywords | collections, linkedlist, map, nodelist, arraylist |

## Links

- npm: https://www.npmjs.com/package/collect-your-stuff
- Repository: https://github.com/jheagle/collect-your-stuff
- Homepage: https://github.com/jheagle/collect-your-stuff#readme
- Issues: https://github.com/jheagle/collect-your-stuff/issues
- npm.io page: https://npm.io/package/collect-your-stuff

## Dependencies (1)

- [core-js](https://npm.io/package/core-js.md) ^3.51.0

## Recent versions

- 2.4.0 (latest) — 2026-11-04
- 2.3.0 — 2026-10-20
- 2.2.1 — 2026-10-14
- 2.2.0 — 2026-10-09
- 2.1.2 — 2026-09-23
- 2.1.1 — 2026-09-22
- 2.1.0 — 2026-09-21
- 2.0.0 — 2026-09-21
- 1.4.0 — 2026-09-21
- 1.3.2 — 2026-09-21
- 1.3.0 — 2026-09-21
- 1.2.9 — 2026-09-21
- 1.2.8 — 2026-09-21
- 1.2.7 — 2026-09-18
- 1.2.6 — 2026-07-17
- … 17 more at https://npm.io/package/collect-your-stuff/versions

## README

# Collect your stuff (and go)!

Data allocation and manipulation - a set of classic collection types (linked lists, doubly-linked lists, tree lists,
queues, stacks) built on a common `Linker`/`Arrayable` foundation.

## Install

```shell
npm install collect-your-stuff
```

## Example

```js
const { LinkedList, Queue, Stack } = require('collect-your-stuff')

const list = LinkedList.fromArray(['a', 'b', 'c'])
list.length // 3

const queue = Queue.fromArray([1, 2, 3])
queue.dequeue() // 1

const stack = Stack.fromArray([1, 2, 3])
stack.pop() // 3
```

## Documentation

The reference for every class is in [`docs/`](https://joshuaheagle.com/projects/collect-your-stuff/docs/index.html) (or open `docs/index.html` locally). It is generated from the TypeScript source, and each module is a folder of `src/`:

| Module | What it holds |
| --- | --- |
| `collections` | The collection classes: `Arrayable`/`ArrayElement`, `LinkedList`/`Linker`, `DoublyLinkedList`/`DoubleLinker`, `LinkedTreeList`/`TreeLinker`, `Queue`/`Queueable`/`TaskQueue`, `Stack`/`Stackable`/`TaskStack`, `ScopedCollection` |
| `recipes` | The `Is*` interfaces each collection implements (including `IsScopedCollection`), their iterators, and `Runnable` |
| `services` | Tree-walking helpers (`parseTree`, `parseTreeNext`) and other collection-agnostic utilities |

## Development

```shell
npm install
npm test          # the tests
npm run typecheck # the types
npm run build     # dist/, browser/ and docs/
npm run docs      # only the documentation
```

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