can-stache-key.js
function(parent, key, value, options) {
		var keys = typeof key === "string" ? observeReader.reads(key) : key;
		var last;

		options = options || {};
		if(keys.length > 1) {
			last = keys.pop();
			parent = observeReader.read(parent, keys, options).value;
			keys.push(last);
		} else {
			last = keys[0];
		}
		if(!parent) {
			return;
		}
		var keyValue = peek(parent, last.key);
		// here's where we need to figure out the best way to write

		// if property being set points at a compute, set the compute
		if( observeReader.valueReadersMap.isValueLike.test(keyValue, keys.length - 1, keys, options) ) {
			observeReader.valueReadersMap.isValueLike.write(keyValue, value, options);
		} else {
			if(observeReader.valueReadersMap.isValueLike.test(parent, keys.length - 1, keys, options) ) {
				parent = parent[getValueSymbol]();
			}
			if(observeReader.propertyReadersMap.map.test(parent)) {
				observeReader.propertyReadersMap.map.write(parent, last.key, value, options);
			}
			else if(observeReader.propertyReadersMap.object.test(parent)) {
				observeReader.propertyReadersMap.object.write(parent, last.key, value, options);
				if(options.observation) {
					options.observation.update();
				}
			}
		}
	}
function(parent, key, value, options) {
		var keys = typeof key === "string" ? observeReader.reads(key) : key;
		var last;

		options = options || {};
		if(keys.length > 1) {
			last = keys.pop();
			parent = observeReader.read(parent, keys, options).value;
			keys.push(last);
		} else {
			last = keys[0];
		}
		if(!parent) {
			return;
		}
		var keyValue = peek(parent, last.key);
		// here's where we need to figure out the best way to write

		// if property being set points at a compute, set the compute
		if( observeReader.valueReadersMap.isValueLike.test(keyValue, keys.length - 1, keys, options) ) {
			observeReader.valueReadersMap.isValueLike.write(keyValue, value, options);
		} else {
			if(observeReader.valueReadersMap.isValueLike.test(parent, keys.length - 1, keys, options) ) {
				parent = parent[getValueSymbol]();
			}
			if(observeReader.propertyReadersMap.map.test(parent)) {
				observeReader.propertyReadersMap.map.write(parent, last.key, value, options);
			}
			else if(observeReader.propertyReadersMap.object.test(parent)) {
				observeReader.propertyReadersMap.object.write(parent, last.key, value, options);
				if(options.observation) {
					options.observation.update();
				}
			}
		}
	}
function ( parent , key , value , options ) { var keys = typeof key === "string" ? observeReader . reads ( key ) : key ; var last ; options = options || { } ; if ( keys . length > 1 ) { last = keys . pop ( ) ; parent = observeReader . read ( parent , keys , options ) . value ; keys . push ( last ) ; } else { last = keys [ 0 ] ; } if ( ! parent ) { return ; } var keyValue = peek ( parent , last . key ) ; // here's where we need to figure out the best way to write // if property being set points at a compute, set the compute if ( observeReader . valueReadersMap . isValueLike . test ( keyValue , keys . length - 1 , keys , options ) ) { observeReader . valueReadersMap . isValueLike . write ( keyValue , value , options ) ; } else { if ( observeReader . valueReadersMap . isValueLike . test ( parent , keys . length - 1 , keys , options ) ) { parent = parent [ getValueSymbol ] ( ) ; } if ( observeReader . propertyReadersMap . map . test ( parent ) ) { observeReader . propertyReadersMap . map . write ( parent , last . key , value , options ) ; } else if ( observeReader . propertyReadersMap . object . test ( parent ) ) { observeReader . propertyReadersMap . object . write ( parent , last . key , value , options ) ; if ( options . observation ) { options . observation . update ( ) ; } } } }
This should be able to set a property similar to how read works.
This should be able to set a property similar to how read works .