Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

3.0.0

Compare
Choose a tag to compare
@Zhang-Wei-666 Zhang-Wei-666 released this 18 Sep 02:24
· 40 commits to master since this release
39d5d10

ZenJS 3.0.0 是一个重大更新, 所有方法都经历了重写, 主要是提升了程序的稳定性及使用的便利性 .
这里就对一些重要的更新做出提示.

新增

  1. 新增 Array.$each 方法, 和 Array.prototype.$each 方法行为一致.
  2. 新增 Array.prototype.$chunk 方法, 和 Array.$chunk 方法行为一致.
  3. 新增两个工具方法 isMap, isSet.
  4. 新增工具方法 mapSetToArray, 可以将 Map, Set 类型转为数组.
  5. 新增 Date.$parse 用于解析时间字符串
  6. 新增一系列操作时间对象的方法, 详情见文档.
  7. 新增 Array.prototype[ '$findLast', '$findIndexLast', '$findAll' ] 方法.

移除

  1. 移除 Object.$create 方法
  2. 移除 Math.$randomPlus 方法, 与 Math.$random 进行合并.
  3. 移除 Element.prototype.$selectText 方法

重构

  1. Object.$equals 支持更多类型的值比对, 包括 Map 及 Set 类型, 支持判断无限引用的对象.
  2. Array.$toArray 也支持将 Map 及 Set 类型转换为数组类型.
  3. Array.$equals 可用于与类数组的比较, 这点是 Object.$equals 做不到的.
  4. Object.$assign 支持多种无限引用对象的拦截处理.