A JavaScript library providing ClojureScript's persistent data structures and functional APIs for immutable data manipulation.
Mori is a JavaScript library that provides ClojureScript's persistent data structures and supporting functional APIs for vanilla JavaScript. It solves the problem of efficient immutable data manipulation by offering structures like vectors, maps, and sets with non-destructive updates, enabling predictable state management in applications.
JavaScript developers building applications that require immutable data structures, such as state management in UIs, functional programming projects, or performance-sensitive data processing tasks.
Developers choose Mori for its battle-tested ClojureScript data structures, which have been optimized over years of real-world use, and its purely functional API that avoids side effects. It offers performance advantages, especially with small-sized maps, and includes advanced features like transducers and ES6 compatibility.
ClojureScript's persistent data structures and supporting API from the comfort of vanilla JavaScript
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Based on ClojureScript's data structures optimized over years, with benchmarks showing faster performance than Immutable.js for small hash maps, as noted in the README.
Uses a purely functional API with no public methods on data structures, promoting immutability and side-effect-free code, which is central to its design philosophy.
Includes transducers for zero-allocation data transformations and lazy sequences, enabling high-performance pipelines and efficient on-demand computation.
Supports ES6 iteration via Symbol.iterator and interfaces similar to proposed Map/Set, ensuring seamless integration with modern JavaScript ecosystems.
Gzipped base module is about 6K larger than Immutable.js, which can negatively impact load times in performance-sensitive web applications.
Requires familiarity with ClojureScript's functional paradigms and APIs, which may be alien to developers used to imperative or object-oriented JavaScript.
Building from source necessitates Java SDK and Leiningen, adding overhead compared to pure npm-based JavaScript libraries, as outlined in the build instructions.
mori is an open-source alternative to the following products: