src/js/oop.js
function newInstance(clazz, args) {
    if (arguments.length > 1 && args.length > 0) {
        var f = function () {};
        f.prototype = clazz.prototype;
        var o = new f();
        clazz.apply(o, args);
        return o;
    }

    return new clazz();
}
function newInstance(clazz, args) {
    if (arguments.length > 1 && args.length > 0) {
        var f = function () {};
        f.prototype = clazz.prototype;
        var o = new f();
        clazz.apply(o, args);
        return o;
    }

    return new clazz();
}
function newInstance ( clazz , args ) { if ( arguments . length > 1 && args . length > 0 ) { var f = function ( ) { } ; f . prototype = clazz . prototype ; var o = new f ( ) ; clazz . apply ( o , args ) ; return o ; } return new clazz ( ) ; }
Instantiate a new class instance of the given class with the specified constructor
arguments.
@param  {Function} clazz a class
@param  {Array} [args] an arguments list
@return {Object}  a new instance of the given class initialized with the specified arguments
@method newInstance
@for  zebkit
Instantiate a new class instance of the given class with the specified constructor arguments .