refactor: Uid/Uin转换V2版本

This commit is contained in:
手瓜一十雪
2024-08-04 18:01:31 +08:00
parent 491ec04b46
commit 8817dc6b10
10 changed files with 90 additions and 29 deletions

View File

@@ -2,7 +2,7 @@ import { Peer } from '@/core';
import crypto, { randomInt, randomUUID } from 'crypto';
import { logError } from './log';
class LimitedHashTable<K, V> {
export class LimitedHashTable<K, V> {
private keyToValue: Map<K, V> = new Map();
private valueToKey: Map<V, K> = new Map();
private maxSize: number;