mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-22 00:37:36 -06:00
22 lines
283 B
JavaScript
22 lines
283 B
JavaScript
|
export class FakeModel {
|
||
|
constructor() {
|
||
|
this.values = {};
|
||
|
}
|
||
|
|
||
|
set(key, value) {
|
||
|
this.values[key] = value;
|
||
|
}
|
||
|
|
||
|
get(key) {
|
||
|
return this.values[key];
|
||
|
}
|
||
|
|
||
|
unset(key) {
|
||
|
delete this.values[key];
|
||
|
}
|
||
|
|
||
|
toJSON() {
|
||
|
return Object.assign({}, this.values);
|
||
|
}
|
||
|
}
|