function InheritMultiple(bases = []) { class Bases { constructor() { bases.forEach((base) => Object.assign(this, new base())); } } bases.forEach((base) => { Object.getOwnPropertyNames(base.prototype) .filter((prop) => prop != "constructor") .forEach((prop) => (Bases.prototype[prop] = base.prototype[prop])); }); return Bases; } module.exports = InheritMultiple;