Immutable.js 2.5.0 发布,不可变数据集合
11月23日开源中国源创会年度(北京万豪酒店)千人盛典正在报名中
Immutable.js 2.5.0 发布,此版本现已提供下载,更新内容如下:
新特性:
seq.toStack()
as alias forStack(seq)
flatten
now accepts adepth
number orshallow
boolean to describe how deep it should flatten, by default it now flattens deeply.
Bug 修复:
Cursors can now represent Indexed sequences #97
Readme updates: explain CDN, update examples.
record.clear()
no longer mysteriously vanishes.Unsafe
get
andhas
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.
Immutable 是 Facebook 开发的不可变数据集合。不可变数据一旦创建就不能被修改,是的应用开发更简单,允许使用函数式编程技术,比如惰性评估。Immutable JS 提供一个惰性 Sequence,
允许高效的队列方法链,类似 map
和 filter
,不用创建中间代表。
immutable
通过惰性队列和哈希映射提供 Sequence
, Range
, Repeat
, Map
, OrderedMap
, Set
和一个稀疏 Vector
。