function setModelViewId (modelViewConstructor) {
    // get clone of model view spec definition
    var modelView = _.clone(modelViewConstructor.modelView)
    // get function def of constructor
    modelView.constructor = modelViewConstructor.toString()
    // get each function def and meta if set
    if (typeof modelView.each === 'function') {
        modelView.each = {
            function: modelView.each.toString(),
            meta: modelView.each.meta,
        }
    }
    // get post function def and meta if set
    if (typeof modelView.post === 'function') {
        modelView.post = {
            function: modelView.post.toString(),
            meta: modelView.post.meta,
        }
    }
    // get pre function def and meta if set
    if (typeof modelView.pre === 'function') {
        modelView.pre = {
            function: modelView.pre.toString(),
            meta: modelView.pre.meta,
        }
    }
    // set id on model view
    modelViewConstructor.modelView.modelViewId = stableId(modelView)
}
function setModelViewId (modelViewConstructor) {
    
    var modelView = _.clone(modelViewConstructor.modelView)
    
    modelView.constructor = modelViewConstructor.toString()
    
    if (typeof modelView.each === 'function') {
        modelView.each = {
            function: modelView.each.toString(),
            meta: modelView.each.meta,
        }
    }
    
    if (typeof modelView.post === 'function') {
        modelView.post = {
            function: modelView.post.toString(),
            meta: modelView.post.meta,
        }
    }
    
    if (typeof modelView.pre === 'function') {
        modelView.pre = {
            function: modelView.pre.toString(),
            meta: modelView.pre.meta,
        }
    }
    
    modelViewConstructor.modelView.modelViewId = stableId(modelView)
}
function setModelViewId ( modelViewConstructor ) { // get clone of model view spec definition var modelView = _ . clone ( modelViewConstructor . modelView ) // get function def of constructor modelView . constructor = modelViewConstructor . toString ( ) // get each function def and meta if set if ( typeof modelView . each === 'function' ) { modelView . each = { function : modelView . each . toString ( ) , meta : modelView . each . meta , } } // get post function def and meta if set if ( typeof modelView . post === 'function' ) { modelView . post = { function : modelView . post . toString ( ) , meta : modelView . post . meta , } } // get pre function def and meta if set if ( typeof modelView . pre === 'function' ) { modelView . pre = { function : modelView . pre . toString ( ) , meta : modelView . pre . meta , } } // set id on model view modelViewConstructor . modelView . modelViewId = stableId ( modelView ) }
@function setModelViewId

calculate and set modelViewId for model view object

@param {function} modelViewConstructor
@function setModelViewId