list-toolkitis a zero-dependency ESM JavaScript library providing list-based data structures. Works in Node.js, Bun, Deno, and browsers.
For project structure, core concepts, and the module dependency graph see ARCHITECTURE.md. For detailed usage docs and API references see the wiki.
git clone --recursive https://github.com/uhop/list-toolkit.git
cd list-toolkit
npm installnpm test— run the full test suite (tape-six)node tests/test-<name>.js— run a single test file directlynpm run test:bun— run with Bunnpm run test:deno— run with Denonpm run ts-check— TypeScript type-check (tsc --noEmit)npm run ts-test— run TypeScript typing tests (tests/test-*.ts)npm run lint— Prettier format checknpm run lint:fix— Prettier auto-format
Tests use tape-six. JS tests (tests/test-*.js) cover functionality; TS tests (tests/test-*.ts) cover typing only. See node_modules/tape-six/TESTING.md for the full testing API and patterns.
- ESM-only.
'use strict'is not used; the project is"type": "module". - No runtime dependencies. Never add packages to
dependencies. OnlydevDependenciesare allowed. - Do not modify or delete test expectations without understanding why they changed.
- Prettier: 160 char width, single quotes, no bracket spacing, no trailing commas, arrow parens "avoid" (see
.prettierrc). - 2-space indentation (
.editorconfig). - Imports at top of file. No dynamic imports unless necessary.
- No comments that narrate the code. Don't write a comment that restates what the code does. Allowed, each as the shortest possible marker: JSDoc when requested or required; a reference for a non-trivial algorithm; a non-trivial decision or constraint — why it's this way, including footgun/ordering caveats that have a real reason. The bar is why, never what. Strip narrating comments opportunistically in files you're already editing.
- Start with ARCHITECTURE.md for the module map and dependency graph.
- Wiki markdown files in
wiki/contain detailed usage docs and API references. list/nodes.jsandslist/nodes.jsare the foundational modules — read them first to understand the class hierarchy.