core/Repository.js
function extractChanged(operation) {
        var i, len, op, elem, changed = [];
        if (operation.ops.length > 0) {
            for (i = 0, len = operation.ops.length; i < len; i++) {
                op = operation.ops[i];
                if (op._elem && op._elem._id) {
                    elem = get(op._elem._id);
                    if (elem && !_.contains(changed, elem)) {
                        changed.push(elem);
                    }
                }
                if (op.arg && op.arg._id) {
                    elem = get(op.arg._id);
                    if (elem && !_.contains(changed, elem)) {
                        changed.push(elem);
                    }
                }
            }
        }
        return changed;
    }
function extractChanged(operation) {
        var i, len, op, elem, changed = [];
        if (operation.ops.length > 0) {
            for (i = 0, len = operation.ops.length; i < len; i++) {
                op = operation.ops[i];
                if (op._elem && op._elem._id) {
                    elem = get(op._elem._id);
                    if (elem && !_.contains(changed, elem)) {
                        changed.push(elem);
                    }
                }
                if (op.arg && op.arg._id) {
                    elem = get(op.arg._id);
                    if (elem && !_.contains(changed, elem)) {
                        changed.push(elem);
                    }
                }
            }
        }
        return changed;
    }
function extractChanged ( operation ) { var i , len , op , elem , changed = [ ] ; if ( operation . ops . length > 0 ) { for ( i = 0 , len = operation . ops . length ; i < len ; i ++ ) { op = operation . ops [ i ] ; if ( op . _elem && op . _elem . _id ) { elem = get ( op . _elem . _id ) ; if ( elem && ! _ . contains ( changed , elem ) ) { changed . push ( elem ) ; } } if ( op . arg && op . arg . _id ) { elem = get ( op . arg . _id ) ; if ( elem && ! _ . contains ( changed , elem ) ) { changed . push ( elem ) ; } } } } return changed ; }
Extract changed elements from a given Operation
@param {Operation} operation
@return {Array.<Element>}
Extract changed elements from a given Operation