export class FetchRepoFile { map: Map; prefix: string; constructor(prefix: string) { this.map = new Map(); this.prefix = prefix; } async call(signature: string) { if (this.map.has(signature)) { return this.map.get(signature); } const url = new URL(signature, this.prefix).href; const method = await fetch(url).then((response) => { return response.text(); }); this.map.set(signature, method); return method; } }