Releases: immutable-js/immutable-js
Releases · immutable-js/immutable-js
3.7.1
3.7.0
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 haspush()
,pop()
,unshift()
andshift()
to more closely mirrorList
.- Records initialize lazily. Creating a new Record type with
Record({foo:"bar"})
involves a small bit of work. For applications with a large amount of Records, lazy initialization should help startup times. - Maps can now be constructed by a List of Lists instead of only a List of Arrays.
- toString() prints Map string keys in quotes.
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. #405- Producing subcursors using cursor.cursor() now returns a proper typed cursor. #381
- When a Record is passed to the same Record creation function, it's now returned directly.
- Ensure Records toString() correctly. #383
- Iterating over a sliced Seq can no longer cause an infinite recursion. #394
- Ensure we don't throw when hashing non-extensible object in a modern environment.
- Fix issue where non-existent function could be called if a collection doesn't have a size.
3.6.4
3.6.3
Fixes:
- Improve test coverage of Stack, fixing #332 and #353
- Numerous typo fixings. Me spel gud.
- Fix collection
toString()
when an ES6Symbol
is a value in the collection. - Consider a prototype-free object a "plain object". Fixes #302
- No long enumerates extra key in
canDefineProperty
in rare cases in some versions of Chrome
3.6.2
3.6.1
3.6.0
New:
findEntry()
andfindLastEntry()
will return[key, value]
tuples of the first value to pass a predicate. Related tofind()
andfindLast()
which only returnvalue
.contrib/Cursor
now has the wider suite of methods found onList
andMap
including:updateIn()
setIn()
deleteIn()
merge()
mergeWith()
mergeIn()
mergeDeep()
mergeDeepWith()
mergeDeepIn()
Fixes:
- UMD module wrapper safer to use with CommonJS -> AMD bundlers.
- Clarified some examples in documentation
3.5.0
New:
zip()
,zipWith()
andinterleave()
for combining multiple collections are new methods on indexed collections.isEmpty()
is safer than comparingcount()
orsize
to0
.groupBy()
now returns OrderedMap when called on an ordered collection.hashCode()
included in public API
Fixes:
- Custom
toJSON()
methods on values in a collection respected when provided toJSON.stringify()
. - Fixed issue with browserify including
Cursor
. - Throws TypeError if
getIn
/updateIn
/hasIn
/etc. are not provided valid key paths.
3.4.1
3.4.0
New:
- Improved documentation in Immutable.d.ts, resulting in better generated documentation.
remove
andremoveIn
are now alises for the methodsdelete
anddeleteIn
. No effect on execution (butdeleteIn
is new).- Added
deleteIn
onRecord
. - Added
hasIn
- deeply query for value existence. Cursor
onChange
function can now intercept the new value and return an override (3598f8c).- +0 and -0 are treated as the same value in
Immutable.is
(key equality and Set existence). valueOf()
is now used when determining value equality between two objects. This allowsDate
to be used asMap
key, and provides a more straight-forward way to implement value equality for custom types.
Fixes:
- Mapping over infinite
Seq
no longer throws error about Infinite iteration. (Improve accuracy of infinite iteration warning overall). - Ensure
setIn
can setundefined
as a value. List
iterators no longer return invalid values if theList
was the result of aslice
orshift
.