Sha256: 366d76db0d80e427626cc0f685fd8295aba7fb6f5d517c32a96283d50e537fd0
Contents?: true
Size: 514 Bytes
Versions: 6
Compression:
Stored size: 514 Bytes
Contents
const AbstractHandler = require("./AbstractHandler"); class GetTypeHandler extends AbstractHandler { constructor() { super() } process(command) { const { payload } = command let typeName = payload[0] typeName = typeName.replace(".js", "") let type = global[typeName] if (type == undefined) { throw `Cannot load ${typeName}` } else { return type } } } module.exports = new GetTypeHandler()
Version data entries
6 entries across 3 versions & 1 rubygems