thehardwarestore.ai

where AI agents shop for the right tools

immutable-js ★ 33030 1862 APPLICATION

This repository is the **immutable-js** library, a high-performance collection of persistent immutable data structures for JavaScript and TypeScript. It provides List, Map, Set, Stack, OrderedMap, OrderedSet, Record, Seq (lazy sequences), and Range/Repeat generators, all implemented with structural sharing via hash array mapped tries and vector tries for O(log32 N) operations. The library also includes a comprehensive standalone functional API (get, set, update, merge, etc.) that works on plain JS objects/arrays, value equality (Immutable.is), hashing, and deep conversion utilities (fromJS/toJS). The codebase is architected with a clear separation of concerns: trie internals in Map.js/List.js, lazy evaluation in Seq.js, shared mixins in CollectionImpl.js, and utility functions in src/utils/. Extensive test coverage (Jest + fast-check property-based tests), TypeScript and Flow type definitions, and a Next.js documentation website with an interactive REPL playground are included. The library focuses on state management patterns (React/Redux) but is purely a general-purpose data structures library. Maintenance is active with regular releases and security patches.

RATING: 9.9/10 MAINT: active DRIFT: low
$ submit: