Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Functional Programming
  3. mori

mori

Clojure

A JavaScript library providing ClojureScript's persistent data structures and functional APIs for immutable data manipulation.

Visit WebsiteGitHubGitHub
3.4k stars142 forks0 contributors

What is mori?

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.

Target Audience

JavaScript developers building applications that require immutable data structures, such as state management in UIs, functional programming projects, or performance-sensitive data processing tasks.

Value Proposition

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.

Overview

ClojureScript's persistent data structures and supporting API from the comfort of vanilla JavaScript

Use Cases

Best For

  • Implementing immutable state management in JavaScript applications
  • Functional programming in JavaScript with persistent data structures
  • High-performance data transformations using transducers
  • Building applications that require efficient non-destructive updates
  • Migrating from ClojureScript to JavaScript while retaining data structure semantics
  • Benchmarking against other immutable data structure libraries like Immutable.js

Not Ideal For

  • Applications with strict bundle size constraints, such as progressive web apps targeting slow networks
  • Teams accustomed to object-oriented APIs or method chaining patterns
  • Projects that rely heavily on mutable data structures for legacy code integration without refactoring
  • Environments targeting older browsers without ES6 Symbol.iterator support

Pros & Cons

Pros

Battle-Tested Performance

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.

Functional Purity

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.

Advanced Features

Includes transducers for zero-allocation data transformations and lazy sequences, enabling high-performance pipelines and efficient on-demand computation.

ES6 Compatibility

Supports ES6 iteration via Symbol.iterator and interfaces similar to proposed Map/Set, ensuring seamless integration with modern JavaScript ecosystems.

Cons

Larger Bundle Size

Gzipped base module is about 6K larger than Immutable.js, which can negatively impact load times in performance-sensitive web applications.

Steep Learning Curve

Requires familiarity with ClojureScript's functional paradigms and APIs, which may be alien to developers used to imperative or object-oriented JavaScript.

Complex Build Setup

Building from source necessitates Java SDK and Leiningen, adding overhead compared to pure npm-based JavaScript libraries, as outlined in the build instructions.

Open Source Alternative To

mori is an open-source alternative to the following products:

i
immutable.js

Immutable.js is a JavaScript library providing persistent immutable data structures, such as Lists and Maps, for functional programming and state management.

Frequently Asked Questions

Quick Stats

Stars3,372
Forks142
Contributors0
Open Issues48
Last commit3 months ago
CreatedSince 2012

Tags

#functional-programming#transducers#clojurescript#immutable-data-structures#javascript-library#persistent-data#state-management#performance

Built With

J
JavaScript
C
ClojureScript
L
Leiningen

Links & Resources

Website

Included in

JavaScript34.9kFunctional Programming6.0k
Auto-fetched 1 day ago

Related Projects

immutableimmutable

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

Stars33,061
Forks1,849
Last commit1 day ago
ImmerImmer

Create the next immutable state by mutating the current one

Stars28,946
Forks871
Last commit7 days ago
Lazy.jsLazy.js

Like Underscore, but lazier

Stars5,975
Forks260
Last commit5 years ago
BaobabBaobab

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

Stars3,154
Forks115
Last commit4 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub