glitchkit
Version:
A lightweight toolkit to create and manage expressive, structured, and reusable error types. Perfect for APIs, services, and glitchy adventures
44 lines (43 loc) • 1.1 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class GlitchKitDatabase {
get databaseType() {
return this._databaseType;
}
set databaseType(value) {
this._databaseType = value;
}
get databaseName() {
return this._databaseName;
}
set databaseName(value) {
this._databaseName = value;
}
get databaseUrl() {
return this._databaseUrl;
}
set databaseUrl(value) {
this._databaseUrl = value;
}
withDatabaseType(databaseType) {
this._databaseType = databaseType;
return this;
}
withDatabaseName(databaseName) {
this._databaseName = databaseName;
return this;
}
withDatabaseUrl(databaseUrl) {
this._databaseUrl = databaseUrl;
return this;
}
toJSON() {
const jsonDatabase = {
databaseType: this._databaseType,
databaseName: this._databaseName,
databaseUrl: this._databaseUrl,
};
return jsonDatabase;
}
}
exports.default = GlitchKitDatabase;