pgadmin4/web/regression/javascript/fake_model.js

31 lines
567 B
JavaScript
Raw Normal View History

2019-01-02 04:24:12 -06:00
/////////////////////////////////////////////////////////////
//
// pgAdmin 4 - PostgreSQL Tools
//
2022-01-04 02:24:25 -06:00
// Copyright (C) 2013 - 2022, The pgAdmin Development Team
2019-01-02 04:24:12 -06:00
// This software is released under the PostgreSQL Licence
//
//////////////////////////////////////////////////////////////
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);
}
}