src/modelFactory.js
function(rawObj, arrayInst){
                // create an instance
                var inst = rawObj.constructor === Model ?
                    rawObj : new Model(rawObj);

                // set a pointer to the array
                inst.$$array = arrayInst;

                return inst;
            }
function(rawObj, arrayInst){
                // create an instance
                var inst = rawObj.constructor === Model ?
                    rawObj : new Model(rawObj);

                // set a pointer to the array
                inst.$$array = arrayInst;

                return inst;
            }
function ( rawObj , arrayInst ) { // create an instance var inst = rawObj . constructor === Model ? rawObj : new Model ( rawObj ) ; // set a pointer to the array inst . $$array = arrayInst ; return inst ; }
helper function for creating a new instance of a model from a raw JavaScript obj. If it is already a model, it will be left as it is
helper function for creating a new instance of a model from a raw JavaScript obj . If it is already a model it will be left as it is