devstar插件
This commit is contained in:
21
node_modules/superjson/dist/double-indexed-kv.js
generated
vendored
Normal file
21
node_modules/superjson/dist/double-indexed-kv.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
export class DoubleIndexedKV {
|
||||
constructor() {
|
||||
this.keyToValue = new Map();
|
||||
this.valueToKey = new Map();
|
||||
}
|
||||
set(key, value) {
|
||||
this.keyToValue.set(key, value);
|
||||
this.valueToKey.set(value, key);
|
||||
}
|
||||
getByKey(key) {
|
||||
return this.keyToValue.get(key);
|
||||
}
|
||||
getByValue(value) {
|
||||
return this.valueToKey.get(value);
|
||||
}
|
||||
clear() {
|
||||
this.keyToValue.clear();
|
||||
this.valueToKey.clear();
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=double-indexed-kv.js.map
|
||||
Reference in New Issue
Block a user