Sha256: 6701b57fe047a43569f3e338311e4be6575be57eec8a5fe32a8cd06c8b7cfe3e
Contents?: true
Size: 679 Bytes
Versions: 7
Compression:
Stored size: 679 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
7 entries across 7 versions & 1 rubygems