lib/packages/core-classes.js
function(source_object) {

		var i = 0,
			name,
			uid,
			result = this._createHelperStorage(),
			removed = this._createHelperStorage(),
			added = this._createHelperStorage();

		for (; i < this._count; i++) {

			name = this._data_names[i];
			if (name != null && (name in source_object)) {

				if (source_object[name] === this._data_values[i]) {

					result.push(this._data_uids[i], this._data_values[i], this._data_names[i]);

				} else {

					// Attention: the name has NOT changed, but it will be present in both added and removed names!
					removed.push(this._data_uids[i], this._data_values[i], name);
					uid = this._uid++;
					result.push(uid, source_object[name], name);
					added.push(uid, source_object[name], name);

				}

			} else {

				removed.push(this._data_uids[i], this._data_values[i], this._data_names[i]);

			}

		}

		for (name in source_object) {

			if (this._data_names.indexOf(name) == -1) {

				uid = this._uid++;
				result.push(uid, source_object[name], name);
				added.push(uid, source_object[name], name);

			}

		}

		this._assignStorage(result);
		this._setLength(this._data_uids.length);

		removed.uids.length && this._fire('items_removed', removed.getObject());
		added.uids.length && this._fire('items_added', added.getObject());
		this._fire('collection_changed');

	}
function(source_object) {

		var i = 0,
			name,
			uid,
			result = this._createHelperStorage(),
			removed = this._createHelperStorage(),
			added = this._createHelperStorage();

		for (; i < this._count; i++) {

			name = this._data_names[i];
			if (name != null && (name in source_object)) {

				if (source_object[name] === this._data_values[i]) {

					result.push(this._data_uids[i], this._data_values[i], this._data_names[i]);

				} else {

					// Attention: the name has NOT changed, but it will be present in both added and removed names!
					removed.push(this._data_uids[i], this._data_values[i], name);
					uid = this._uid++;
					result.push(uid, source_object[name], name);
					added.push(uid, source_object[name], name);

				}

			} else {

				removed.push(this._data_uids[i], this._data_values[i], this._data_names[i]);

			}

		}

		for (name in source_object) {

			if (this._data_names.indexOf(name) == -1) {

				uid = this._uid++;
				result.push(uid, source_object[name], name);
				added.push(uid, source_object[name], name);

			}

		}

		this._assignStorage(result);
		this._setLength(this._data_uids.length);

		removed.uids.length && this._fire('items_removed', removed.getObject());
		added.uids.length && this._fire('items_added', added.getObject());
		this._fire('collection_changed');

	}
function ( source_object ) { var i = 0 , name , uid , result = this . _createHelperStorage ( ) , removed = this . _createHelperStorage ( ) , added = this . _createHelperStorage ( ) ; for ( ; i < this . _count ; i ++ ) { name = this . _data_names [ i ] ; if ( name != null && ( name in source_object ) ) { if ( source_object [ name ] === this . _data_values [ i ] ) { result . push ( this . _data_uids [ i ] , this . _data_values [ i ] , this . _data_names [ i ] ) ; } else { // Attention: the name has NOT changed, but it will be present in both added and removed names! removed . push ( this . _data_uids [ i ] , this . _data_values [ i ] , name ) ; uid = this . _uid ++ ; result . push ( uid , source_object [ name ] , name ) ; added . push ( uid , source_object [ name ] , name ) ; } } else { removed . push ( this . _data_uids [ i ] , this . _data_values [ i ] , this . _data_names [ i ] ) ; } } for ( name in source_object ) { if ( this . _data_names . indexOf ( name ) == - 1 ) { uid = this . _uid ++ ; result . push ( uid , source_object [ name ] , name ) ; added . push ( uid , source_object [ name ] , name ) ; } } this . _assignStorage ( result ) ; this . _setLength ( this . _data_uids . length ) ; removed . uids . length && this . _fire ( 'items_removed' , removed . getObject ( ) ) ; added . uids . length && this . _fire ( 'items_added' , added . getObject ( ) ) ; this . _fire ( 'collection_changed' ) ; }
Compares item names with object keys, removing values without names and values that do not match.
Adds new values from `source_object`
@param {Object} source_object
Compares item names with object keys removing values without names and values that do not match . Adds new values from source_object