Travis build: 1411

This commit is contained in:
30secondsofcode
2019-08-29 11:45:51 +00:00
parent 5a8271f47e
commit 0a282d32f2
9 changed files with 52 additions and 57 deletions

View File

@ -10,7 +10,6 @@ Use `Object.assign()` and an empty object (`{}`) to create a shallow clone of th
Use `Object.keys()` and `Array.prototype.forEach()` to determine which key-value pairs need to be deep cloned.
```js
const deepClone = obj => {
let clone = Object.assign({}, obj);
Object.keys(clone).forEach(
@ -19,8 +18,8 @@ const deepClone = obj => {
return Array.isArray(obj) && obj.length
? (clone.length = obj.length) && Array.from(clone)
: Array.isArray(obj)
? Array.from(obj)
: clone;
? Array.from(obj)
: clone;
};
```