(url)
| 58 | * @return An object containing metadata as key-value pairs. |
| 59 | */ |
| 60 | export async function loadHostedMetadata(url) { |
| 61 | ui.status('Loading metadata from ' + url); |
| 62 | try { |
| 63 | const metadataJson = await fetch(url); |
| 64 | const metadata = await metadataJson.json(); |
| 65 | ui.status('Done loading metadata.'); |
| 66 | return metadata; |
| 67 | } catch (err) { |
| 68 | console.error(err); |
| 69 | ui.status('Loading metadata failed.'); |
| 70 | } |
| 71 | } |
nothing calls this directly
no outgoing calls
no test coverage detected