bitburner-src/src/utils/ImportCache.ts

15 lines
328 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 {
static get(hash: string) {
return importCache[hash];
}
static store(hash: string, value: ScriptUrl[]): void {
if (importCache[hash]) return;
importCache[hash] = value;
}
}