mirror of
https://github.com/gamedig/node-gamedig.git
synced 2024-11-10 21:26:56 +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
8 lines
238 B
JavaScript
8 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]()
|
|
}
|