js/data/Collection.js
function (items, options) {
            options = options || {};

            _.defaults(options, {
                root: null,
                query: null,
                pageSize: null,
                queryParameters: {},
                sortParameters: null,
                factory: this.$modelFactory || require('js/data/Model'),
                type: null
            });


            this.$filterCache = {};
            this.$sortCache = {};
            this._count = {
                callbacks: [],
                state: COUNTSTATE.UNKNOWN
            };

            if (options.root) {
                _.defaults(options, options.root.options);
                this.$modelFactory = options.root.$modelFactory;
            }

            this.callBase(items, options);

            this.$pageCache = [];
        }
function (items, options) {
            options = options || {};

            _.defaults(options, {
                root: null,
                query: null,
                pageSize: null,
                queryParameters: {},
                sortParameters: null,
                factory: this.$modelFactory || require('js/data/Model'),
                type: null
            });


            this.$filterCache = {};
            this.$sortCache = {};
            this._count = {
                callbacks: [],
                state: COUNTSTATE.UNKNOWN
            };

            if (options.root) {
                _.defaults(options, options.root.options);
                this.$modelFactory = options.root.$modelFactory;
            }

            this.callBase(items, options);

            this.$pageCache = [];
        }
function ( items , options ) { options = options || { } ; _ . defaults ( options , { root : null , query : null , pageSize : null , queryParameters : { } , sortParameters : null , factory : this . $modelFactory || require ( 'js/data/Model' ) , type : null } ) ; this . $filterCache = { } ; this . $sortCache = { } ; this . _count = { callbacks : [ ] , state : COUNTSTATE . UNKNOWN } ; if ( options . root ) { _ . defaults ( options , options . root . options ) ; this . $modelFactory = options . root . $modelFactory ; } this . callBase ( items , options ) ; this . $pageCache = [ ] ; }
read only to determinate if its a collection and prevent circular dependencies
read only to determinate if its a collection and prevent circular dependencies