MCPcopy Create free account
hub / github.com/SAP/ui5-builder / fromUI5LegacyName

Function fromUI5LegacyName

lib/lbt/utils/ModuleName.js:10–20  ·  view source on GitHub ↗
(name, suffix)

Source from the content-addressed store, hash-verified

8 * @returns {string} URN representing the same resource
9 */
10export function fromUI5LegacyName(name, suffix) {
11 // UI5 only supports a few names with dots in them, anything else will be converted to slashes
12 if ( name.startsWith("sap.ui.thirdparty.jquery.jquery-") ) {
13 name = "sap/ui/thirdparty/jquery/jquery-" + name.slice("sap.ui.thirdparty.jquery.jquery-".length);
14 } else if ( name.startsWith("jquery.sap.") || name.startsWith("jquery-") ) {
15 // do nothing
16 } else {
17 name = name.replace(/\./g, "/");
18 }
19 return name + (suffix || ".js");
20}
21
22export function toUI5LegacyName(path) {
23 if ( !path.endsWith(".js") ) {

Callers 11

recursePageMethod · 0.90
_getRootViewModuleMethod · 0.90
_analyzeManifestMethod · 0.90
analyzeMethod · 0.90
onDeclareMethod · 0.90
onJQuerySapRequireMethod · 0.90
_analyzeViewRootNodeMethod · 0.90
_analyzeNodeMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected