henrybuilt-js-library
Advanced tools
Comparing version 1.2.6 to 1.2.7
{ | ||
"name": "henrybuilt-js-library", | ||
"version": "1.2.6", | ||
"version": "1.2.7", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -15,3 +15,3 @@ var _ = require('lodash'); | ||
return libObject.extend(..._.map(classes, c => c.prototype)); | ||
return libObject.extend(_.map(classes, c => c.prototype), {soft: true}); | ||
}, | ||
@@ -18,0 +18,0 @@ |
@@ -162,6 +162,10 @@ var libObject; | ||
extend(target, ...sources) { | ||
extend(objects, {soft=false} = {}) { | ||
var [target, ...sources] = {}; | ||
_.forEach(sources, source => { | ||
for (var key in source) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
if (!soft || !target.hasOwnProperty(key)) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
} | ||
} | ||
@@ -168,0 +172,0 @@ }); |
Sorry, the diff of this file is too big to display
123797
941