src/parsers/dataParser.js
function _extractActions( opts )
	{
		// main properties
		const 	data 		= opts.data,
				configState = opts.stateData,
				stateView 	= opts.stateView,
				stateName  	= opts.stateName;

		// new defined properties
		let stateTransitions = [],
			viewData 		 = opts.viewData,
			appDataView,
			action,
			statePrefix;

		forein( configState.actions, ( prop, actionName ) => {

			statePrefix = (stateName+ '->' +actionName);
			appDataView = data[ prop.target ].view;

			// Return action data for FSM
			action = {
				action 		: actionName,
				target 		: prop.target,
				_id 		: statePrefix
			};

			// return ViewData for View manager and append all views
			viewData[ statePrefix ] = {
				currentView 		: stateView,
				nextView 			: appDataView,
				linkedVTransModules : _extractTransitions( prop, stateView, appDataView ),
				name  				: actionName
			};

			// // assign fsm action to state
			stateTransitions[ stateTransitions.length ] = action;
		});

		return { stateTransitions : stateTransitions, viewData : viewData };
	}
function _extractActions( opts )
	{
		// main properties
		const 	data 		= opts.data,
				configState = opts.stateData,
				stateView 	= opts.stateView,
				stateName  	= opts.stateName;

		// new defined properties
		let stateTransitions = [],
			viewData 		 = opts.viewData,
			appDataView,
			action,
			statePrefix;

		forein( configState.actions, ( prop, actionName ) => {

			statePrefix = (stateName+ '->' +actionName);
			appDataView = data[ prop.target ].view;

			// Return action data for FSM
			action = {
				action 		: actionName,
				target 		: prop.target,
				_id 		: statePrefix
			};

			// return ViewData for View manager and append all views
			viewData[ statePrefix ] = {
				currentView 		: stateView,
				nextView 			: appDataView,
				linkedVTransModules : _extractTransitions( prop, stateView, appDataView ),
				name  				: actionName
			};

			// // assign fsm action to state
			stateTransitions[ stateTransitions.length ] = action;
		});

		return { stateTransitions : stateTransitions, viewData : viewData };
	}
function _extractActions ( opts ) { // main properties const data = opts . data , configState = opts . stateData , stateView = opts . stateView , stateName = opts . stateName ; // new defined properties let stateTransitions = [ ] , viewData = opts . viewData , appDataView , action , statePrefix ; forein ( configState . actions , ( prop , actionName ) => { statePrefix = ( stateName + '->' + actionName ) ; appDataView = data [ prop . target ] . view ; // Return action data for FSM action = { action : actionName , target : prop . target , _id : statePrefix } ; // return ViewData for View manager and append all views viewData [ statePrefix ] = { currentView : stateView , nextView : appDataView , linkedVTransModules : _extractTransitions ( prop , stateView , appDataView ) , name : actionName } ; // // assign fsm action to state stateTransitions [ stateTransitions . length ] = action ; } ) ; return { stateTransitions : stateTransitions , viewData : viewData } ; }
extract the actual transition data for the state
@param  {object} configState - state data
@return {array} transition array - FSM
extract the actual transition data for the state