UNPKG

@mathquis/node-assistant-protocol

Version:
14 lines 296 B
module.exports = (hermes, logger) => { return (topic, object) => { return { ...object, load: async () => { logger.debug('%s is loaded', object.name) await hermes.publish(topic, hermes.serialize({})) }, onLoad: handler => { return hermes.on(topic, handler) } } } }