bitburner-src/src/utils/ImportCache.ts

15 lines
341 B
TypeScript
Raw Normal View History

2021-12-13 01:39:53 +01:00
import { ScriptUrl } from "../Script/ScriptUrl";
const importCache: { [hash: string]: ScriptUrl[] } = {};
export class ImportCache {
2021-12-24 05:26:05 +01:00
static get(hash: string): ScriptUrl[] {
2021-12-13 01:39:53 +01:00
return importCache[hash];
}
static store(hash: string, value: ScriptUrl[]): void {
if (importCache[hash]) return;
importCache[hash] = value;
}
}