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