发布于 2017-03-11 23:54:19 | 89 次阅读 | 评论: 0 | 来源: 网友投递

这里有新鲜出炉的精品教程,程序狗速度看过来!

Immutable.js 不可变数据集合

Immutable 是 Facebook 开发的不可变数据集合。不可变数据一旦创建就不能被修改,是的应用开发更简单,允许使用函数式编程技术,比如惰性评估。Immutable JS 提供一个惰性 Sequence,允许高效的队列方法链,类似 map 和 filter ,不用创建中间代表。


Immutable.js v4.0.0-rc.1 发布了,这是一个预览版,因此这里的更新日志不会包含所有的更新内容,查看提交记录以了解完整更新内容。更新内容如下:

重大变更:

  • The Iterable class has been renamed to Collection, and isIterable() has been renamed to isCollection(). Aliases with the existing names exist to make transitioning code easier.

  • The "predicate" functions, isCollectionisKeyedisIndexedisAssociative have been moved from Iterable. to the top level exports.

  • Record is no longer an Immutable Collection type.

    • Now isCollection(myRecord) returns false instead of true.

    • The sequence API (such as mapfilterforEach) no longer exist on Records.

    • delete() and clear() no longer exist on Records.

  • The toJSON() method is now a shallow conversion (previously it was an alias for toJS(), which remains a deep conversion).

  • Some minor implementation details have changed, which may require updates to libraries which deeply integrate with Immutable.js's private APIs.

  • The Cursor API is officially deprecated. Use immutable-cursor instead.

新特性

  • A new predicate function isValueObject() helps to detect objects which implement equals() and hashCode(), and type definitions now define the interface ValueObject which you can implement in your own code to create objects which behave as values and can be keys in Maps or entries in Sets.

  • The Flowtype and TypeScript type definitions have been completely rewritten with much higher quality and accuracy, taking advantage of the latest features from both amazing tools.

  • Using fromJS() with a "reviver" function now provides access to the key path to each translated value. (#1118)

Bug 修复

  • Numerous bug fixes have gone into this release

下载地址:



历史版本 :
Immutable.js v4.0.0-rc.9 发布,不可变数据集合
Immutable.js v4.0.0-rc.7 发布,不可变数据集合
Immutable.js v4.0.0-rc.3 发布,不可变数据集合
Immutable.js v4.0.0-rc.2 发布,不可变数据集合
Immutable.js v4.0.0-rc.1 发布,不可变数据集合
Immutable.js 3.8.1 发布,不可变数据集合
Immutable.js 3.8.0 发布,不可变数据集合
Immutable.js 3.7.6 发布,不可变数据集合
Immutable.js 3.7.4 发布,不可变数据集合
Immutable.js 3.7.3 发布,不可变数据集合
Immutable.js 3.7.2 发布,不可变数据集合
Immutable.js 3.7.1 发布,不可变数据集合
最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务