This repository has been archived by the owner on Dec 15, 2021. It is now read-only.
3.0.0
ZenJS 3.0.0
是一个重大更新, 所有方法都经历了重写, 主要是提升了程序的稳定性及使用的便利性 .
这里就对一些重要的更新做出提示.
新增
- 新增 Array.$each 方法, 和 Array.prototype.$each 方法行为一致.
- 新增 Array.prototype.$chunk 方法, 和 Array.$chunk 方法行为一致.
- 新增两个工具方法 isMap, isSet.
- 新增工具方法 mapSetToArray, 可以将 Map, Set 类型转为数组.
- 新增 Date.$parse 用于解析时间字符串
- 新增一系列操作时间对象的方法, 详情见文档.
- 新增 Array.prototype[ '$findLast', '$findIndexLast', '$findAll' ] 方法.
移除
- 移除 Object.$create 方法
- 移除 Math.$randomPlus 方法, 与 Math.$random 进行合并.
- 移除 Element.prototype.$selectText 方法
重构
- Object.$equals 支持更多类型的值比对, 包括 Map 及 Set 类型, 支持判断无限引用的对象.
- Array.$toArray 也支持将 Map 及 Set 类型转换为数组类型.
- Array.$equals 可用于与类数组的比较, 这点是 Object.$equals 做不到的.
- Object.$assign 支持多种无限引用对象的拦截处理.