1. XenForo 1.5.14 中文版——支持中文搜索!现已发布!查看详情
  2. Xenforo 爱好者讨论群:215909318 XenForo专区

新闻 Immutable.js v4.0.0-rc.1 发布,不可变数据集合 下载

本帖由 漂亮的石头2017-03-12 发布。版面名称:软件资讯

  1. 漂亮的石头

    漂亮的石头 版主 管理成员

    注册:
    2012-02-10
    帖子:
    487,979
    赞:
    47
    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, isCollection, isKeyed, isIndexed, isAssociative 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 map, filter, forEach) 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.1 发布,不可变数据集合下载地址
     
正在加载...