Portage:JS的快速pubsub

时间:2021-05-23 06:24:31
【文件属性】:
文件名称:Portage:JS的快速pubsub
文件大小:23KB
文件格式:ZIP
更新时间:2021-05-23 06:24:31
JavaScript 搬运 JS的快速发布/订阅 npm install portage bower install portage 与AMD,CommonJS,global(作为portage )和ES6一起使用。 介绍 Portage正在利用来将出版物与订阅进行匹配。 包括对通配符订阅的支持(请参阅下文)。 出版物和订阅按渠道进行细分。 渠道用于发布有关某些主题的消息,以及订阅有关某些主题(或主题模式)的消息。 通道在内部维护订阅的树形结构。 主题以分层方式组织。 例如, chat.new-message是chat的子主题。 这在很大程度上影响了库在发布消息时有效过滤订阅处理程序的方式,而且还与订阅中使用通配符有关(请参阅下文)。 集线器只是通道的集合,可以使用密钥轻松访问(并动态创建)。 集线器API var Hub = require('portage').Hub; var myHub
【文件预览】:
Portage-master
----.gitignore(44B)
----package.json(1KB)
----src()
--------Channel.js(1KB)
--------portage.js(277B)
--------Hub.js(377B)
--------Subscription.js(1009B)
----webpack.config.js(772B)
----dist()
--------portage.js.map(9KB)
--------portage.js(10KB)
----examples()
--------cross_module_communication()
----README.md(4KB)
----tests()
--------3.greedy_pattern_topic.js(8KB)
--------0.arguments_validation.js(4KB)
--------4.mixed_pattern_topic.js(2KB)
--------6.subscriptions_control.js(4KB)
--------1.simple_specific_topic.js(2KB)
--------7.publications_meta.js(3KB)
--------2.simple_pattern_topic.js(3KB)
--------mocha.opts(58B)
--------5.multiple_subscriptions.js(2KB)
----benchmark()
--------index.js(2KB)
--------RESULTS(794B)
--------test.js(144B)
--------tests()
----bower.json(594B)

网友评论