JSFiddle - React, Tailwind, and code Playground
HTML
<script src="//greenish.github.io/js-objct/dist/objct.js"></script>
JavaScript
//////////////////////////////////////////////////////////////////////////////
// Modules
var a = function(){};
a.static = "A";
a.A = function(){
return "A";
};
var b = function(){};
b.static = "B";
b.B = function(){
return "B";
};
//////////////////////////////////////////////////////////////////////////////
var factoryAB = objct(a, b);
var factoryBA = objct(b, a);
console.log('factoryAB.A() === "A"',factoryAB.A() === "A");
console.log('factoryAB.B() === "B"',factoryAB.B() === "B");
console.log('factoryAB.static === "B"',factoryAB.static === "B");
console.log('factoryBA.static === "A"',factoryBA.static === "A");
var instanceAB = factoryAB();
console.log('instanceAB.static === undefined',instanceAB.static === undefined);