Package Exports
- depth-assign
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (depth-assign) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
depth-assign
特征
- 深度拷贝,包括Object、Array、函数类型
- 设置递归方向,由左到右,由右到左,后者覆盖前者
- 默认底数参数
使用方法
/**
* 深度拷贝
* arr:Object | Array,克隆拷贝
* b :Boolean,设置递归方向,由左到右,由右到左,后者覆盖前者
* def:Object({}), 传递给函数的初始值
* 返回一个创建好的值(引用===def)
*/
depthAssign(arr, b, def = {})