lib/immutable-core-model-view.js
function () {
        // create new instance based on class meta data
        var instance = _.clone(modelView)
        // get number of args
        var numArgs = arguments.length
        // if function is passed a single object then these arguments will
        // be passed directly to the view instance func
        if (numArgs === 1 && typeof arguments[0] === 'object') {
            instance.args = arguments[0]
        }
        // otherwise create args as empty object
        else {
            instance.args = {}
            // if there are arguments then they must be string property names
            if (numArgs > 0) {
                // create properties
                instance.args.properties = []
                // check that all args are strings
                for (var i=0; i < numArgs; i++) {
                    assert(typeof arguments[i] === 'string', 'invalid argument '+arguments[i])
                    // add argument to list of properties
                    instance.args.properties[i] = arguments[i]
                }
            }
        }
        // set modelViewInstanceId on instance
        setModelViewInstanceId(instance)
        // set class properties
        instance.class = 'ImmutableCoreModelViewInstance'
        instance.ImmutableCoreModelViewInstance = true
        // return instance object
        return instance
    }
function () {
        // create new instance based on class meta data
        var instance = _.clone(modelView)
        // get number of args
        var numArgs = arguments.length
        // if function is passed a single object then these arguments will
        // be passed directly to the view instance func
        if (numArgs === 1 && typeof arguments[0] === 'object') {
            instance.args = arguments[0]
        }
        // otherwise create args as empty object
        else {
            instance.args = {}
            // if there are arguments then they must be string property names
            if (numArgs > 0) {
                // create properties
                instance.args.properties = []
                // check that all args are strings
                for (var i=0; i < numArgs; i++) {
                    assert(typeof arguments[i] === 'string', 'invalid argument '+arguments[i])
                    // add argument to list of properties
                    instance.args.properties[i] = arguments[i]
                }
            }
        }
        // set modelViewInstanceId on instance
        setModelViewInstanceId(instance)
        // set class properties
        instance.class = 'ImmutableCoreModelViewInstance'
        instance.ImmutableCoreModelViewInstance = true
        // return instance object
        return instance
    }
return constructor function that will generate a custom model view instance based on the parent model view class