node-deep-extend
node-deep-extend copied to clipboard
extending of "old" javascript classes is broken | bug
When I try
function BearerStrategy() {
}
BearerStrategy.prototype.authenticate = function () {
};
const extended = deepExtend({}, { strategies: [
new BearerStrategy(),
] });
extended.strategies.forEach((s) => {
console.log('extended', s.authenticate);
});
const s = new BearerStrategy();
console.log('original', s.authenticate);
The output will be:
extended undefined
original [Function]
which is totally wrong
is this repo dead ?
@seeden this lib isn't supposed to be used to clone some class instances (if it's not Date, RegExp, Buffer or Array).
P.S. Sorry about delay.
@seeden Actually I'm going to implement custom cloning strategies in new major version, but can't say when I do it.