pgadmin4/web/regression/javascript/fake_model.js
2022-01-04 13:54:25 +05:30

31 lines
567 B
JavaScript

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