Files
game-server-watcher/node_modules/gamedig/lib/index.js
Smith a5f3794527 include prod deps in vcs with some exceptions
* cloudno.de has problems installing new dependencies lately..
2022-06-30 22:59:51 +02:00

24 lines
511 B
JavaScript

const QueryRunner = require('./QueryRunner');
let singleton = null;
class Gamedig {
constructor(runnerOpts) {
this.queryRunner = new QueryRunner(runnerOpts);
}
async query(userOptions) {
return await this.queryRunner.run(userOptions);
}
static getInstance() {
if (!singleton) singleton = new Gamedig();
return singleton;
}
static async query(...args) {
return await Gamedig.getInstance().query(...args);
}
}
module.exports = Gamedig;