Files
NapCatQQ/.pnpm-store/v3/files/23/be5304a68b151968b913afff3de8c15c60ac8ae5f8525529815e166a9f4620286a2b18d5c586082caefcc936db44be1b7a7f48590ec21b19145fdb4113b32d
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

40 lines
954 B
Plaintext

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class RegistryBase {
constructor() {
this._registryMap = new Map();
}
entries() {
return this._registryMap.entries();
}
getAll(key) {
this.ensure(key);
return this._registryMap.get(key);
}
get(key) {
this.ensure(key);
const value = this._registryMap.get(key);
return value[value.length - 1] || null;
}
set(key, value) {
this.ensure(key);
this._registryMap.get(key).push(value);
}
setAll(key, value) {
this._registryMap.set(key, value);
}
has(key) {
this.ensure(key);
return this._registryMap.get(key).length > 0;
}
clear() {
this._registryMap.clear();
}
ensure(key) {
if (!this._registryMap.has(key)) {
this._registryMap.set(key, []);
}
}
}
exports.default = RegistryBase;