Skip to content

Instantly share code, notes, and snippets.

@jlongster
Last active November 7, 2024 13:11
Show Gist options
  • Save jlongster/bce43d9be633da55053f to your computer and use it in GitHub Desktop.
Save jlongster/bce43d9be633da55053f to your computer and use it in GitHub Desktop.
List of immutable libraries

A lot of people mentioned other immutable JS libraries after reading my post. I thought it would be good to make a list of available ones.

There are two types of immutable libraries: simple helpers for copying JavaScript objects, and actual persistent data structure implementations. My post generally analyzed the tradeoffs between both kinds of libraries and everything applies to the below libraries in either category.

Libraries are sorted by github popularity.

Persistent Data Structures w/structural sharing

  • immutable.js - Facebook's implementation with a JS-like API
  • mori - ClojureScript's persistent data structures exported to JS
  • ancient-oak - Not sure about this one. It doesn't seem to fully implement efficient structural sharing (tries, etc) like the above libraries, but it claims to implement parts of it and I see some implementation of a data structure in there. It also copies object props onto the data structure so you can access them like obj.property, which is neat but might have a perf cost.

Other libraries built on top of immutable.js: typed-immutable and immstruct

Immutable helpers (simply shallow copy JS objects)

@emmanueltouzery
Copy link

I created prelude.ts which would fit in the list too.

@rchod
Copy link

rchod commented Nov 7, 2018

Immer should be on the list https://github.com/mweststrate/immer

@estaub
Copy link

estaub commented Jun 14, 2019

Fossil alert: last updated in 2015.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment