mirror of
https://github.com/gamedig/node-gamedig.git
synced 2024-11-16 00:38:31 +01:00
8192ed07e0
* feat: export games and protocols besides GameDig * fix: revert ProtocolResolver rename * fix: imports on the attempt tools * docs: update changelog to note exports
7 lines
238 B
JavaScript
7 lines
238 B
JavaScript
import * as protocols from '../protocols/index.js'
|
|
|
|
export const getProtocol = (protocolId) => {
|
|
if (!(protocolId in protocols)) { throw Error('Protocol definition file missing: ' + protocolId) }
|
|
|
|
return new protocols[protocolId]()
|
|
}
|