Travis build: 1474

This commit is contained in:
30secondsofcode
2019-09-28 10:18:08 +00:00
parent 462b06e282
commit c913e38cf6
13 changed files with 159 additions and 100 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;
};
```