function clas() {
            // we can't simply use a plain new clas() here
            // since we might get called unbound from a child class
            // or as a constructor
            // therefore we must use the correct 'this' in that case
            if (this !== global) {
                plain ? (plain = false) : ctor.apply(this, arguments);
                return this;

            } else {
                // Case of missing new keyword, a bit hackish but still
                // better than adding another prototype layer
                return (plain = true) && clas.apply(new clas(), arguments);
            }
        }
function clas() {
            
            
            
            
            if (this !== global) {
                plain ? (plain = false) : ctor.apply(this, arguments);
                return this;

            } else {
                
                
                return (plain = true) && clas.apply(new clas(), arguments);
            }
        }
function clas ( ) { // we can't simply use a plain new clas() here // since we might get called unbound from a child class // or as a constructor // therefore we must use the correct 'this' in that case if ( this !== global ) { plain ? ( plain = false ) : ctor . apply ( this , arguments ) ; return this ; } else { // Case of missing new keyword, a bit hackish but still // better than adding another prototype layer return ( plain = true ) && clas . apply ( new clas ( ) , arguments ) ; } }
class instance constructor
class instance constructor