lib/replicator.js
function applyOperations(replicant, operations) {
	const oldValue = clone(replicant.value);
	operations.forEach(operation => shared.applyOperation(replicant, operation));
	replicant.revision++;
	replicant.emit('change', replicant.value, oldValue, operations);

	emitToClients(replicant.namespace, 'replicant:operations', {
		name: replicant.name,
		namespace: replicant.namespace,
		revision: replicant.revision,
		operations
	});

	saveReplicant(replicant);
}
function applyOperations(replicant, operations) {
	const oldValue = clone(replicant.value);
	operations.forEach(operation => shared.applyOperation(replicant, operation));
	replicant.revision++;
	replicant.emit('change', replicant.value, oldValue, operations);

	emitToClients(replicant.namespace, 'replicant:operations', {
		name: replicant.name,
		namespace: replicant.namespace,
		revision: replicant.revision,
		operations
	});

	saveReplicant(replicant);
}
function applyOperations ( replicant , operations ) { const oldValue = clone ( replicant . value ) ; operations . forEach ( operation => shared . applyOperation ( replicant , operation ) ) ; replicant . revision ++ ; replicant . emit ( 'change' , replicant . value , oldValue , operations ) ; emitToClients ( replicant . namespace , 'replicant:operations' , { name : replicant . name , namespace : replicant . namespace , revision : replicant . revision , operations } ) ; saveReplicant ( replicant ) ; }
Applies an array of operations to a replicant.
@param replicant {object} - The Replicant to perform these operation on.
@param operations {array} - An array of operations.
Applies an array of operations to a replicant .