object-config-for-smart-setter
Advanced tools
Comparing version 1.0.8 to 1.0.9
@@ -30,4 +30,5 @@ 'use strict'; | ||
}, | ||
clone: function clone(obj) { | ||
return Object.assign({}, obj); | ||
clone: function clone(item) { | ||
var x = Array.isArray(item) ? [] : {}; | ||
return Object.assign(x, item); | ||
}, | ||
@@ -34,0 +35,0 @@ emptyObjectOrMap: function emptyObjectOrMap() { |
{ | ||
"name": "object-config-for-smart-setter", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -22,4 +22,7 @@ const objectConfig = { | ||
}, | ||
clone: obj => { | ||
return Object.assign({}, obj) | ||
clone: item => { | ||
const x = Array.isArray(item) | ||
? [] | ||
: {} | ||
return Object.assign(x, item) | ||
}, | ||
@@ -26,0 +29,0 @@ emptyObjectOrMap: () => { |
2652
77