MCPcopy Create free account
hub / github.com/UI5/webcomponents / processName

Function processName

packages/base/src/asset-registries/Illustrations.ts:108–122  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

106 * If there is no loader registered for the collection, it falls back to the default collection
107 */
108const processName = (name: string) => {
109 let collection = getCollection();
110 const [set, illustrationName] = name.split("/");
111 let registryKey = `${set}/${collection}/${illustrationName}`;
112
113 if (!loaders.has(registryKey) && collection !== FALLBACK_COLLECTION) {
114 collection = FALLBACK_COLLECTION;
115 registryKey = `${set}/${collection}/${illustrationName}`;
116 }
117
118 return {
119 registryKey,
120 collection,
121 };
122};
123
124/**
125 * Registers a custom illustration in the global registry using template functions.

Callers 3

_loadIllustrationOnceFunction · 0.70
getIllustrationDataSyncFunction · 0.70
getIllustrationDataFunction · 0.70

Calls 1

getCollectionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…