ts-options-defaults
Advanced tools
Comparing version 0.0.3-4 to 0.0.3-5
@@ -35,8 +35,9 @@ "use strict"; | ||
// Handle classes and merge their functions. | ||
// const prototype = Object.getPrototypeOf(source); | ||
// Object.entries(prototype).forEach(([key, value]) => { | ||
// if (typeof value === 'function') { | ||
// object[key] = value.bind(object); | ||
// } | ||
// }); | ||
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) { | ||
@@ -43,0 +44,0 @@ var _b = __read(_a, 2), key = _b[0], value = _b[1]; |
{ | ||
"name": "ts-options-defaults", | ||
"version": "0.0.3-4", | ||
"version": "0.0.3-5", | ||
"license": "GPL-3.0", | ||
@@ -5,0 +5,0 @@ "author": "Artur Kurowski <radarsu@gmail.com>", |
@@ -9,8 +9,8 @@ export const merge = (object: any, ...sources: any[]) => { | ||
// Handle classes and merge their functions. | ||
// const prototype = Object.getPrototypeOf(source); | ||
// Object.entries(prototype).forEach(([key, value]) => { | ||
// if (typeof value === 'function') { | ||
// object[key] = value.bind(object); | ||
// } | ||
// }); | ||
const prototype = Object.getPrototypeOf(source); | ||
Object.entries(prototype).forEach(([key, value]) => { | ||
if (typeof value === 'function') { | ||
object[key] = value.bind(object); | ||
} | ||
}); | ||
@@ -17,0 +17,0 @@ Object.entries(source).forEach(([key, value]) => { |
9270
206