pgadmin4/web/regression/javascript/fake_model.js
2021-01-04 15:34:45 +05:30

31 lines
567 B
JavaScript

/////////////////////////////////////////////////////////////
//
// pgAdmin 4 - PostgreSQL Tools
//
// Copyright (C) 2013 - 2021, The pgAdmin Development Team
// 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);
}
}