src/sap.ui.core/src/ui5loader.js
function findMapForContext(sContext) {
		var p, mMap;
		if ( sContext != null ) {
			// maps are defined on module IDs, reduce URN to module ID
			sContext = urnToIDAndType(sContext).id;
			p = sContext.length;
			mMap = mMaps[sContext];
			while ( p > 0 && mMap == null ) {
				p = sContext.lastIndexOf('/');
				if ( p > 0 ) { // Note: an empty segment at p = 0 (leading slash) will be ignored
					sContext = sContext.slice(0, p);
					mMap = mMaps[sContext];
				}
			}
		}
		// if none is found, fallback to '*' map
		return mMap || mMaps['*'];
	}
function findMapForContext(sContext) {
		var p, mMap;
		if ( sContext != null ) {
			// maps are defined on module IDs, reduce URN to module ID
			sContext = urnToIDAndType(sContext).id;
			p = sContext.length;
			mMap = mMaps[sContext];
			while ( p > 0 && mMap == null ) {
				p = sContext.lastIndexOf('/');
				if ( p > 0 ) { // Note: an empty segment at p = 0 (leading slash) will be ignored
					sContext = sContext.slice(0, p);
					mMap = mMaps[sContext];
				}
			}
		}
		// if none is found, fallback to '*' map
		return mMap || mMaps['*'];
	}
function findMapForContext ( sContext ) { var p , mMap ; if ( sContext != null ) { // maps are defined on module IDs, reduce URN to module ID sContext = urnToIDAndType ( sContext ) . id ; p = sContext . length ; mMap = mMaps [ sContext ] ; while ( p > 0 && mMap == null ) { p = sContext . lastIndexOf ( '/' ) ; if ( p > 0 ) { // Note: an empty segment at p = 0 (leading slash) will be ignored sContext = sContext . slice ( 0 , p ) ; mMap = mMaps [ sContext ] ; } } } // if none is found, fallback to '*' map return mMap || mMaps [ '*' ] ; }
Find the most specific map config that matches the given context resource
@param {string} sContext Resource name to be used as context
@returns {Object<string,string>|undefined} Most specific map or <code>undefined</code>
Find the most specific map config that matches the given context resource