lib/replicator.js
function assign(replicant, value) {
	const oldValue = replicant.value;
	replicant._ignoreProxy = true;
	replicant.__value = shared._proxyRecursive(replicant, value, '/');
	replicant._ignoreProxy = false;
	replicant.revision++;
	replicant.emit('change', value, oldValue);

	replicant.log.replicants('Assigned:', value);

	emitToClients(replicant.namespace, 'replicant:assignment', {
		name: replicant.name,
		namespace: replicant.namespace,
		newValue: value,
		revision: replicant.revision
	});

	saveReplicant(replicant);
}
function assign(replicant, value) {
	const oldValue = replicant.value;
	replicant._ignoreProxy = true;
	replicant.__value = shared._proxyRecursive(replicant, value, '/');
	replicant._ignoreProxy = false;
	replicant.revision++;
	replicant.emit('change', value, oldValue);

	replicant.log.replicants('Assigned:', value);

	emitToClients(replicant.namespace, 'replicant:assignment', {
		name: replicant.name,
		namespace: replicant.namespace,
		newValue: value,
		revision: replicant.revision
	});

	saveReplicant(replicant);
}
function assign ( replicant , value ) { const oldValue = replicant . value ; replicant . _ignoreProxy = true ; replicant . __value = shared . _proxyRecursive ( replicant , value , '/' ) ; replicant . _ignoreProxy = false ; replicant . revision ++ ; replicant . emit ( 'change' , value , oldValue ) ; replicant . log . replicants ( 'Assigned:' , value ) ; emitToClients ( replicant . namespace , 'replicant:assignment' , { name : replicant . name , namespace : replicant . namespace , newValue : value , revision : replicant . revision } ) ; saveReplicant ( replicant ) ; }
Assigns a new value to a Replicant.
@param replicant {object} - The Replicant to assign.
@param value {*} - The new value to assign.
Assigns a new value to a Replicant .