Sha256: 40f3e5df0cf7b7fc4ea263b2479a3b26c5caecbfc7ec3391e952d7efdb44c83e
Contents?: true
Size: 654 Bytes
Versions: 14
Compression:
Stored size: 654 Bytes
Contents
const AbstractHandler = require("./AbstractHandler"); class GetTypeHandler extends AbstractHandler { constructor() { super() } process(command) { try { 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 } } catch (error) { return this.process_stack_trace(error, this.constructor.name) } } } module.exports = new GetTypeHandler()
Version data entries
14 entries across 7 versions & 1 rubygems