(name, suffix)
| 8 | * @returns {string} URN representing the same resource |
| 9 | */ |
| 10 | export 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 | |
| 22 | export function toUI5LegacyName(path) { |
| 23 | if ( !path.endsWith(".js") ) { |
no outgoing calls
no test coverage detected