dist/server-module/lance-gg.js
// build a clone of this object with pruned strings (if necessary)
build a clone of this object with pruned strings (if necessary)
build a clone of this object with pruned strings ( if necessary )
prunedStringsClone(serializer, prevObject) {
        if (!prevObject) return this;
        prevObject = serializer.deserialize(prevObject).obj;
        let netScheme = this.constructor.netScheme;
        let isString = p => netScheme[p].type === BaseTypes.TYPES.STRING;
        let hasChanged = p => prevObject[p] !== this[p];
        let changedStrings = Object.keys(netScheme).filter(isString).filter(hasChanged);
        if (changedStrings.length == 0) return this;
        let prunedCopy = new this.constructor(null, { id: null });
        for (let p of Object.keys(netScheme))
            prunedCopy[p] = changedStrings.indexOf(p) < 0 ? this[p] : null;
        return prunedCopy;
    }
prunedStringsClone ( serializer , prevObject ) { if ( ! prevObject ) return this ; prevObject = serializer . deserialize ( prevObject ) . obj ; let netScheme = this . constructor . netScheme ; let isString = p => netScheme [ p ] . type === BaseTypes . TYPES . STRING ; let hasChanged = p => prevObject [ p ] !== this [ p ] ; let changedStrings = Object . keys ( netScheme ) . filter ( isString ) . filter ( hasChanged ) ; if ( changedStrings . length == 0 ) return this ; let prunedCopy = new this . constructor ( null , { id : null } ) ; for ( let p of Object . keys ( netScheme ) ) prunedCopy [ p ] = changedStrings . indexOf ( p ) < 0 ? this [ p ] : null ; return prunedCopy ; }
build a clone of this object with pruned strings (if necessary)
build a clone of this object with pruned strings ( if necessary )
// get list of string properties which changed // build a clone with pruned strings