cloneDeep
最后更新于:2022-04-02 00:01:44
## cloneDeep
+ [link](./cloneDeep "Link to this entry.")
+ [source](https://github.com/lodash/lodash/blob/4.5.0正式版/lodash.src.js#L9346 "View in source.")
+ [npm](https://www.npmjs.com/package/lodash.clonedeep "See the npm package.")
```
_.cloneDeep(value)
```
这个方法类似 `_.clone`,除了它会递归拷贝 `value`。
### 参数
1. value (\*)
要深拷贝的值
### 返回值 (\*)
返回拷贝后的值
### 示例
```
var objects = [{ 'a': 1 }, { 'b': 2 }];
var deep = _.cloneDeep(objects);
console.log(deep[0] === objects[0]);
// => false
```
';