NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #1081 most downloaded on npm
Immutable Data Collections
Last release 1 months ago
16 Aug 2026
Ships fairly regularly
a new release about every 2 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
14 years old
123 releases · first in 2013
isSuperset can be called with an array of values.
Fixes:
New:
Improvements to documentation around equality, hasIn and withMutations
Fixes:
hasIn and withMutationsOne column per quarter.
Minor improvements to docs and Readme
contains() is now called includes() to match the ES6 specification. contains() still exists as an alias.
New:
contains() is now called includes() to match the ES6 specification. contains() still exists as an alias.merge() family of functions now get the currently merging key as a 3rd argument, in case merge strategy should alter based on key.
New:
merge() family of functions now get the currently merging key as a 3rd argument, in case merge strategy should alter based on key.IndexedCursor now has push(), pop(), unshift() and shift() to more closely mirror List.Record({foo:"bar"}) involves a small bit of work. For applications with a large amount of Records, lazy initialization should help startup times.Fixes:
is() allows usage of valueOf to return primitives without recursing or encountering a reference error.merge()/union() work inside withMutations when initial collection is empty. #4053.6.3 was a broken npm release.
Fixes:
Improve test coverage of Stack, fixing #332 and #353
Fixes:
toString() when an ES6 Symbol is a value in the collection.canDefineProperty in rare cases in some versions of ChromeImproves performance of creating Cursors.
Fixes:
Iterating over a Cursor to a List could result in an infinite loop.
Fixes:
findEntry() and findLastEntry() will return [key, value] tuples of the first value to pass a predicate. Related to find() and findLast() which only re
New:
findEntry() and findLastEntry() will return [key, value] tuples of the first value to pass a predicate. Related to find() and findLast() which only return value.contrib/Cursor now has the wider suite of methods found on List and Map including:
updateIn()setIn()deleteIn()merge()mergeWith()mergeIn()mergeDeep()mergeDeepWith()mergeDeepIn()Fixes:
zip(), zipWith() and interleave() for combining multiple collections are new methods on indexed collections.
New:
zip(), zipWith() and interleave() for combining multiple collections are new methods on indexed collections.isEmpty() is safer than comparing count() or size to 0.groupBy() now returns OrderedMap when called on an ordered collection.hashCode() included in public APIFixes:
toJSON() methods on values in a collection respected when provided to JSON.stringify().Cursor.getIn/updateIn/hasIn/etc. are not provided valid key paths.deleteIn alias now exists for all types (was missing from Map).
Fixes:
deleteIn alias now exists for all types (was missing from Map).Improved documentation in Immutable.d.ts, resulting in better generated documentation.
New:
remove and removeIn are now alises for the methods delete and deleteIn. No effect on execution (but deleteIn is new).deleteIn on Record.hasIn - deeply query for value existence.Cursor onChange function can now intercept the new value and return an override (3598f8c71f54cddba8e09647226e77dce69f6b1e).Immutable.is (key equality and Set existence).valueOf() is now used when determining value equality between two objects. This allows Date to be used as Map key, and provides a more straight-forward way to implement value equality for custom types.Fixes:
Seq no longer throws error about Infinite iteration. (Improve accuracy of infinite iteration warning overall).setIn can set undefined as a value.List iterators no longer return invalid values if the List was the result of a slice or shift.Added mergeIn and deepMergeIn to Map and List.
New:
setIn added to RecordmergeIn and deepMergeIn to Map and List.updateIn, and all *In methods accept any Iterable as key path, not just Array.concat, merge and union. If this is empty, and a single non-empty argument is provided, then attempt to return the argument unmodified.Fixes:
Fixes - Ensure equality symmetry
Fixes
Immutable.isOrdered describes if an iterable has a defined iteration order.
New:
Immutable.isOrdered describes if an iterable has a defined iteration order.Immutable.is and iterable#equals now respect ordered-ness to evaluate equality.Performance enhancement to Maps and Sets with 8 or fewer entries.
New:
OrderedSet introduced.sorted, returning an OrderedMap or OrderedSet, respectively.sortBy, maxBy and minBy performanceFixed:
Map#set or Set#add now return themselves for a no-op involving a hash collision.List) with strings are now coerced to number when possible, mirroring the behavior of native Array.List, Stack and Set constructors documentation now matches behavior.A number of issues with v3.0.0 spotted and fixed by the growing Immutable.js community.
A number of issues with v3.0.0 spotted and fixed by the growing Immutable.js community.
Fixes:
this's constructor. Ensures objects passed to concat are not exploded into an array of fields which is almost never intended.any removed from TypeScript filesthis.mergeDeep is smarter about when to merge nested values vs replacing existing values.
Record in READMECursors in contrib now work in any ES5 environment
Fixes:
v3.0.0 brings the Immutable collection API closer to ES6 Map and Set, introduces opt-in lazy operations, clarifies the differences between keyed and n
v3.0.0 brings the Immutable collection API closer to ES6 Map and Set, introduces opt-in lazy operations, clarifies the differences between keyed and non-keyed collections and more.
A lot has changed, please check out the upgrade guide for more details and help for upgrading your code to work with this new version of the library.
New:
map, filter, etc) are now eager by default.Seq and toSeq for explicit lazy operations.Sequence to IterableVector to Listlength to sizeempty() and from() removedof(...values) on indexed and set collectionscontrib/ directory
Cursor now moved to contrib.Map.isMap().groupBy() and countBy() return concrete Map.keyOf() and lastKeyOf() on KeyedIterable are similar to indexOf() and lastIndexOf() on IndexedIterable.Vector slicing along N^2-1 bound could result in exception.
Fixes:
Fix filename issue on case-sensitive file systems
Fix filename issue on case-sensitive file systems
max, maxBy, min, minBy - find the largest or smallest item in any sequence.
New:
max, maxBy, min, minBy - find the largest or smallest item in any sequence.filterNot - filters by the complement of the predicate, e.g. where the filter function returns false, the values will be kept.setIn and removeIn for altering deep immutable structures.Fixes:
toJS and equals.updateIn could fail to set a value if it matched the default value, or if it looked like an empty collection.
Fixes:
updateIn could fail to set a value if it matched the default value, or if it looked like an empty collection.toArray and toObject functions which could cause accidental mutation of the immutable Sequences.seq.toStack() as alias for Stack(seq)
New:
seq.toStack() as alias for Stack(seq)flatten now accepts a depth number or shallow boolean to describe how deep it should flatten, by default it now flattens deeply.Fixed:
record.clear() no longer mysteriously vanishes.get and has optimizations removed from ValuesSeq.last on a sequence with unknown length no longer returns undefined #141seq.reverse().get(i) no longer returns incorrect values for indexed sequences.seq.filter().get(i) no longer returns incorrect values for indexed sequences.flatten no longer flattens sequencible values (string, array, object), but only Sequence instances, leading to more predictable flattening.Stack! a linked-list style structure with efficient addition and removal from the front of the list.
New:
Stack! a linked-list style structure with efficient addition and removal from the front of the list.Fixes:
indexedSeq.skip(n).get(i) now returns the correct value.skip(n).get(-i) and take(n).get(-i) return correct values for negative indices.Nothing published for this version
All Sequences, including both concrete collections (Map, Vector, Set) and lazy Sequences (mapped, filtered) can be iterated.
All Sequences, including both concrete collections (Map, Vector, Set) and lazy Sequences (mapped, filtered) can be iterated.
API:
values() returns an iterator object where each call to next() provides the next value.
keys() returns an iterator object where each call to next() provides the next key.
entries() returns an iterator object where each call to next() provides the next entry as a [key, value] tuple.
Example:
var myMap = Immutable.Map([['A', 1], ['B', 2], ['C', 3]]);
var entries = myMap.entries();
entries.next() // { value: ['A', 1], done: false }
entries.next() // { value: ['B', 2], done: false }
entries.next() // { value: ['C', 3], done: false }
entries.next() // { value: undefined, done: true }
All Sequences also support iteration via the @@iterator and Symbol.iterator methods, so they can be used in ES6 for-of comprehensions.
interpose()seq.flip().reverse().flip() becomes seq.reverse().get() and has() to be O(1) on lazy sequences.Immutable.is or seq.equals() could throw or incorrectly return false.Fixed: Immutable.is() could throw for some Sequences
Fixed: Immutable.is() could throw for some Sequences
Improved using arbitrary Objects as keys or as members of a Set for IE8.
var m = new Map([['A', 1], ['B', 2], ['C', 3]]);
// Map {"A" => 1, "B" => 2, "C" => 3}
var im = Immutable.Map(m);
// Map { A: 1, B: 2, C: 3 }
m = new Map(im);
// Map {"A" => 1, "B" => 2, "C" => 3}
take() could iterate one step too far.getIn() could throw if one of the intermediate keys does not exist.groupBy and countBy now return Sequence instead of Map.
New:
groupBy and countBy now return Sequence instead of Map.Bugs:
seq.flip().reverse() can result in incorrect value.Indexed Sequences are now always treated densely, including Vector and ArraySequence. This means iterators, forEach, and Sequence methods visit unset
New:
has returns true for unset indicies within length. This warrants a minor-version bump.flatten turns a Sequence of Sequences into a single Sequence.flatMap maps over a Sequence, flattening the result. The alias chain is provided to begin to adhere to the Fantasy Land spec.Bugs:
reduce behavior matches Array#reduce.join behavior matches Array#joinmergeDeeptake and skip now return immutable sequences.
New new new!
withMutationsBugs Fixed:
take and skip now return immutable sequences.splice behavior now matches Array.prototype.spliceSequence's keys, values, entries and fromEntries renamed to keySeq, valueSeq, entrySeq and fromEntrySeq respectively.
Breaking Changes:
keys, values, entries and fromEntries renamed to keySeq, valueSeq, entrySeq and fromEntrySeq respectively.Features Added:
keys, values and entries, added to all concrete collections.Bugs Fixed:
Source used by node is now not-minified
withMutations and all complex mutation methods implemented with it (such as merge), now return this when they result in a no-op.update and updateInNothing published for this version
Nothing published for this version
Fix issue with case-sensitive file systems
NaN)TypeScript resolution was occasionally incorrect
pop() of 33-element Vector returned incorrect result.Map() constructor now mirrors ES6 spec.Cursors - Alpha support. Please provide feedback!
rest and butLast methods.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →