@creately/jsonmix
Advanced tools
Comparing version 2.2.0 to 3.0.0
@@ -40,2 +40,3 @@ "use strict"; | ||
var isObservable = require("is-observable"); | ||
var mergeWith = require("lodash.mergewith"); | ||
var rxjs_1 = require("rxjs"); | ||
@@ -146,3 +147,3 @@ var JsonMix = /** @class */ (function () { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var target, result_1, property; | ||
var target, result_1; | ||
return __generator(this, function (_a) { | ||
@@ -180,7 +181,8 @@ switch (_a.label) { | ||
case 8: | ||
for (property in data) { | ||
if (data.hasOwnProperty(property)) { | ||
target[property] = data[property]; | ||
mergeWith(target, data, function (_obj, src) { | ||
if (Array.isArray(src)) { | ||
return src; | ||
} | ||
} | ||
return undefined; | ||
}); | ||
return [2 /*return*/, target]; | ||
@@ -187,0 +189,0 @@ } |
{ | ||
"name": "@creately/jsonmix", | ||
"version": "2.2.0", | ||
"version": "3.0.0", | ||
"description": "Easy to use deserialisation from JSON into JavaScript Objects complete with functions", | ||
@@ -44,4 +44,5 @@ "main": "dist/index.js", | ||
"is-promise": "^2.1.0", | ||
"lodash.mergewith": "^4.6.1", | ||
"rxjs": "^6.0.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
19235
9
232
4
+ Addedlodash.mergewith@^4.6.1
+ Addedlodash.mergewith@4.6.2(transitive)