swannodette/mori

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

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 33 minutes ago
Type:Library / SDKCategory(s):Core & Utility LibrariesLanguages & Runtimes
Added to GitGenius on September 20th, 2026
Created on May 11th, 2012
Open Issues & Pull Requests: 64 (+0)
GitHub issues: Enabled
Number of forks: 142
Total Stargazers: 3,370 (+0)
Total Subscribers: 71 (+0)

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 0
New in 7 days: 0
Closed in 7 days: 0
Avg open age: N/A days
Stale 30+ days: 0
Stale 90+ days: 0

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

Mori is a library that brings ClojureScript's persistent data structures and supporting APIs to vanilla JavaScript.

The library solves the problem of working with immutable data structures in JavaScript by exposing ClojureScript's battle-tested implementations through a functional API. Rather than providing methods on data structure objects, Mori uses a functional approach where operations are called as functions, following ClojureScript conventions. The data structures include vectors, maps, sets, and lazy sequences, all designed to support efficient non-destructive updates.

Developers should choose Mori if they need immutable data structures with a functional API and are willing to accept a larger bundle size in exchange for performance characteristics optimized for real-world usage. The tool suits projects where functional programming patterns are valued and where the performance profile of small collections matters. Compared to Immutable.js, the README indicates that Mori offers a functional API rather than methods on objects, delivers faster performance particularly for small hash maps, and has been subjected to continuous benchmarking over an extended period, though it carries a larger gzipped footprint. The library supports ES6 iteration through Symbol.iterator, includes transducers for zero-allocation collection operations, and provides ES6 Map and Set inspired interfaces where key lookup is based on value rather than reference.

The project shows active refinement toward JavaScript idioms, having introduced breaking changes to adopt idiomatic JavaScript naming conventions. Performance improvements have been pursued systematically, with optimizations to the underlying ClojureScript compiler yielding considerable gains across the board, and hash maps now default to a faster ArrayMap implementation that automatically promotes to PersistentHashMap as needed. The tool exposes direct arity invokes to eliminate calling overhead for users benchmarking against other immutable data structure implementations.