mirror of
https://github.com/gamedig/node-gamedig.git
synced 2024-10-07 17:27:25 +02:00
cee42e7a88
* Convert to LF? * Modify gitattributes * Force LF * Git --renormalize * Update .gitattributes to enforce eol=lf * Redo CRLF -> LF on remaining files
24 lines
464 B
JavaScript
24 lines
464 B
JavaScript
import QueryRunner from './QueryRunner.js'
|
|
|
|
let singleton = null
|
|
|
|
export default 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)
|
|
}
|
|
}
|