deepClone: Fixed indents & failing tests
This commit is contained in:
@ -3,6 +3,6 @@ let clone = Object.assign({}, obj);
|
||||
Object.keys(clone).forEach(
|
||||
key => (clone[key] = typeof obj[key] === 'object' ? deepClone(obj[key]) : obj[key])
|
||||
);
|
||||
return Array.isArray(obj) ? (clone.length = obj.length) && Array.from(clone) : obj;
|
||||
return Array.isArray(obj) ? Array.from(clone) : clone;
|
||||
};
|
||||
module.exports = deepClone;
|
||||
module.exports = deepClone;
|
||||
|
||||
Reference in New Issue
Block a user