conditional.js
function getModuleName(nameWithConditional, variation) {
			var modName;
			var conditionIndex = nameWithConditional.search(conditionalRegEx);

			// look for any "/" after the condition
			var lastSlashIndex = nameWithConditional.indexOf("/",
				nameWithConditional.indexOf("}"));

			// substitution of a folder name
			if (lastSlashIndex !== -1) {
				modName = nameWithConditional.substr(0, conditionIndex) + variation;
			}
			else {
				modName = nameWithConditional.replace(conditionalRegEx, variation);
			}

			return modName;
		}
function getModuleName(nameWithConditional, variation) {
			var modName;
			var conditionIndex = nameWithConditional.search(conditionalRegEx);

			// look for any "/" after the condition
			var lastSlashIndex = nameWithConditional.indexOf("/",
				nameWithConditional.indexOf("}"));

			// substitution of a folder name
			if (lastSlashIndex !== -1) {
				modName = nameWithConditional.substr(0, conditionIndex) + variation;
			}
			else {
				modName = nameWithConditional.replace(conditionalRegEx, variation);
			}

			return modName;
		}
function getModuleName ( nameWithConditional , variation ) { var modName ; var conditionIndex = nameWithConditional . search ( conditionalRegEx ) ; // look for any "/" after the condition var lastSlashIndex = nameWithConditional . indexOf ( "/" , nameWithConditional . indexOf ( "}" ) ) ; // substitution of a folder name if ( lastSlashIndex !== - 1 ) { modName = nameWithConditional . substr ( 0 , conditionIndex ) + variation ; } else { modName = nameWithConditional . replace ( conditionalRegEx , variation ) ; } return modName ; }
Returns the bundle module name for a string substitution
@param {string} nameWithConditional The module identifier including the condition
@param {string} variation A match of the glob pattern
@return {string} The bundle module name
Returns the bundle module name for a string substitution