message-tool
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

message-tool插件使用说明

本插件是mq-wz得增强搬,mq-wz后续不在维护,使用mq-wz项目可以切换至message-tool

import Mq from 'message-tool';

// 创建实例
const event = new Mq({
    enable: true,  // 是否启用消息持久化
});

// 发布消息
event.emit(topic, eventId, data, {
    enable: true 
    useCount: 1 // 消息使用次数
})

// 监听消息
event.on(topic, eventId, fn, execCount) // execCount为监听次数

Readme

Keywords

none

Package Sidebar

Install

npm i message-tool

Weekly Downloads

1

Version

1.0.4

License

ISC

Unpacked Size

46.8 kB

Total Files

4

Last publish

Collaborators

  • wz-larry