ts-options-defaults
Advanced tools
Comparing version 0.0.3-5 to 0.0.3-6
@@ -34,14 +34,6 @@ "use strict"; | ||
} | ||
// Handle classes and merge their functions. | ||
var prototype = Object.getPrototypeOf(source); | ||
Object.entries(prototype).forEach(function (_a) { | ||
var _b = __read(_a, 2), key = _b[0], value = _b[1]; | ||
if (typeof value === 'function') { | ||
object[key] = value.bind(object); | ||
} | ||
}); | ||
Object.entries(source).forEach(function (_a) { | ||
var _b = __read(_a, 2), key = _b[0], value = _b[1]; | ||
// Handle simple types. | ||
if (typeof value !== 'object' || Array.isArray(value)) { | ||
// Handle simple types and members of classes different than Object. | ||
if (typeof value !== 'object' || Array.isArray(value) || value.constructor.name !== 'Object') { | ||
object[key] = value; | ||
@@ -48,0 +40,0 @@ return; |
{ | ||
"name": "ts-options-defaults", | ||
"version": "0.0.3-5", | ||
"version": "0.0.3-6", | ||
"license": "GPL-3.0", | ||
"files": [ | ||
"dist" | ||
], | ||
"author": "Artur Kurowski <radarsu@gmail.com>", | ||
@@ -6,0 +9,0 @@ "homepage": "https://github.com/radarsu/ts-options-defaults#readme", |
4838
4
56