Base UI
NPM Installation / build (16.x, ubuntu-latest) (push) Has been cancelled
NPM Installation / build (16.x, windows-latest) (push) Has been cancelled
NPM Installation / build (17.x, ubuntu-latest) (push) Has been cancelled
NPM Installation / build (17.x, windows-latest) (push) Has been cancelled
NPM Installation / build (18.x, ubuntu-latest) (push) Has been cancelled
NPM Installation / build (18.x, windows-latest) (push) Has been cancelled

This commit is contained in:
2026-06-25 11:15:13 +07:00
parent c539fe47af
commit cc038a7372
20561 changed files with 1811255 additions and 41 deletions
+26
View File
@@ -0,0 +1,26 @@
import { DoubleIndexedKV } from './double-indexed-kv.js';
export class Registry {
constructor(generateIdentifier) {
this.generateIdentifier = generateIdentifier;
this.kv = new DoubleIndexedKV();
}
register(value, identifier) {
if (this.kv.getByValue(value)) {
return;
}
if (!identifier) {
identifier = this.generateIdentifier(value);
}
this.kv.set(identifier, value);
}
clear() {
this.kv.clear();
}
getIdentifier(value) {
return this.kv.getByValue(value);
}
getValue(identifier) {
return this.kv.getByKey(identifier);
}
}
//# sourceMappingURL=registry.js.map