cod-retrieve
Version:
A repo to retrieve/ download study dicom files in the specified local folder.
14 lines • 451 B
JavaScript
class MetadataManager {
metadata = {};
async getMetadata(url, headers) {
if (this.metadata[url]) {
return Promise.resolve(this.metadata[url]);
}
const result = await fetch(url, { headers }).then((res) => res.json());
this.metadata[url] = result;
return result;
}
}
const metadataManager = new MetadataManager();
export default metadataManager;
//# sourceMappingURL=MetadataManager.js.map