src/expression-helpers.js
function getObservableValue_fromDynamicKey_fromObservable(key, root, helperOptions, readOptions) {
	// This needs to return something similar to a ScopeKeyData with intialValue and parentHasKey
	var getKeys = function(){
		return stacheKey.reads(("" + canReflect.getValue(key)).replace(/\./g, "\\."));
	};
	var parentHasKey;
	var computeValue = new SetterObservable(function getDynamicKey() {
		var readData = stacheKey.read( canReflect.getValue(root) , getKeys());
		parentHasKey = readData.parentHasKey;
		return readData.value;
	}, function setDynamicKey(newVal){
		stacheKey.write(canReflect.getValue(root), getKeys(), newVal);
	});
	// This prevents lazy evalutaion
	Observation.temporarilyBind(computeValue);

	// peek so no observable that might call getObservableValue_fromDynamicKey_fromObservable will re-evaluate if computeValue changes.
	computeValue.initialValue = ObservationRecorder.peekValue(computeValue);
	computeValue.parentHasKey = parentHasKey;
	// Todo:
	// 1. We should warn here if `initialValue` is undefined.  We can expose the warning function
	//    in can-view-scope and call it here.
	// 2. We should make this lazy if possible.  We can do that by making getter/setters for
	//    initialValue and parentHasKey (and possibly @@can.valueHasDependencies)
	return computeValue;
}
function getObservableValue_fromDynamicKey_fromObservable(key, root, helperOptions, readOptions) {
	// This needs to return something similar to a ScopeKeyData with intialValue and parentHasKey
	var getKeys = function(){
		return stacheKey.reads(("" + canReflect.getValue(key)).replace(/\./g, "\\."));
	};
	var parentHasKey;
	var computeValue = new SetterObservable(function getDynamicKey() {
		var readData = stacheKey.read( canReflect.getValue(root) , getKeys());
		parentHasKey = readData.parentHasKey;
		return readData.value;
	}, function setDynamicKey(newVal){
		stacheKey.write(canReflect.getValue(root), getKeys(), newVal);
	});
	// This prevents lazy evalutaion
	Observation.temporarilyBind(computeValue);

	// peek so no observable that might call getObservableValue_fromDynamicKey_fromObservable will re-evaluate if computeValue changes.
	computeValue.initialValue = ObservationRecorder.peekValue(computeValue);
	computeValue.parentHasKey = parentHasKey;
	// Todo:
	// 1. We should warn here if `initialValue` is undefined.  We can expose the warning function
	//    in can-view-scope and call it here.
	// 2. We should make this lazy if possible.  We can do that by making getter/setters for
	//    initialValue and parentHasKey (and possibly @@can.valueHasDependencies)
	return computeValue;
}
function getObservableValue_fromDynamicKey_fromObservable ( key , root , helperOptions , readOptions ) { // This needs to return something similar to a ScopeKeyData with intialValue and parentHasKey var getKeys = function ( ) { return stacheKey . reads ( ( "" + canReflect . getValue ( key ) ) . replace ( / \. / g , "\\." ) ) ; } ; var parentHasKey ; var computeValue = new SetterObservable ( function getDynamicKey ( ) { var readData = stacheKey . read ( canReflect . getValue ( root ) , getKeys ( ) ) ; parentHasKey = readData . parentHasKey ; return readData . value ; } , function setDynamicKey ( newVal ) { stacheKey . write ( canReflect . getValue ( root ) , getKeys ( ) , newVal ) ; } ) ; // This prevents lazy evalutaion Observation . temporarilyBind ( computeValue ) ; // peek so no observable that might call getObservableValue_fromDynamicKey_fromObservable will re-evaluate if computeValue changes. computeValue . initialValue = ObservationRecorder . peekValue ( computeValue ) ; computeValue . parentHasKey = parentHasKey ; // Todo: // 1. We should warn here if `initialValue` is undefined.  We can expose the warning function //    in can-view-scope and call it here. // 2. We should make this lazy if possible.  We can do that by making getter/setters for //    initialValue and parentHasKey (and possibly @@can.valueHasDependencies) return computeValue ; }
## Helpers
## Helpers