(name: string)
| 106 | * If there is no loader registered for the collection, it falls back to the default collection |
| 107 | */ |
| 108 | const 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. |
no test coverage detected
searching dependent graphs…