lib/collection/mutation-tracker.js
function (instruction) {
        // @todo: use argument spread here once we drop support for node v4
        var payload = Array.prototype.slice.call(arguments, 1);

        // invalid call
        if (!(instruction && payload)) {
            return;
        }

        // unknown instruction
        if (!(instruction === PRIMITIVE_MUTATIONS.SET || instruction === PRIMITIVE_MUTATIONS.UNSET)) {
            return;
        }

        // for primitive mutations the arguments form the mutation object
        // if there is more complex mutation, we have to use a processor to create a mutation for the instruction
        this.addMutation(payload);
    }
function (instruction) {
        // @todo: use argument spread here once we drop support for node v4
        var payload = Array.prototype.slice.call(arguments, 1);

        // invalid call
        if (!(instruction && payload)) {
            return;
        }

        // unknown instruction
        if (!(instruction === PRIMITIVE_MUTATIONS.SET || instruction === PRIMITIVE_MUTATIONS.UNSET)) {
            return;
        }

        // for primitive mutations the arguments form the mutation object
        // if there is more complex mutation, we have to use a processor to create a mutation for the instruction
        this.addMutation(payload);
    }
function ( instruction ) { // @todo: use argument spread here once we drop support for node v4 var payload = Array . prototype . slice . call ( arguments , 1 ) ; // invalid call if ( ! ( instruction && payload ) ) { return ; } // unknown instruction if ( ! ( instruction === PRIMITIVE_MUTATIONS . SET || instruction === PRIMITIVE_MUTATIONS . UNSET ) ) { return ; } // for primitive mutations the arguments form the mutation object // if there is more complex mutation, we have to use a processor to create a mutation for the instruction this . addMutation ( payload ) ; }
Track a mutation.

@param {String} instruction the type of mutation
Track a mutation .