Socket
Book a DemoInstallSign in
Socket

actorjs-bus

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

actorjs-bus

ActorJs Bus

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

ActorJs Bus

See ActorJs Core

Description

ActorJs Bus is a module wich implements a EventBus. The bus can be used to broadcast messages over the actor system. Actors can subscribe to the bus and listen on a particular message.

Installation

Install it

npm i actorjs-bus

Use it nodejs

var actorBus = require('actor-bus');

Use it web

var actorBus =  actorjs.bus

Subscribe to the bus

actorBus.EventBus.subscribe(function(message){
    //Use message
})

Publish to the bus

actorBus.EventBus.publish(message)

Use in combination with TypeMatchers and TypeMessage

var typeMatcher = actorBus.core.ActorMatchers.TypeMatcher;
var typeMessage = actorBus.core.ActorMatchers.TypeMessage;

actorBus.EventBus.subscribe(typeMatcher({
    <typeName>: function (<Object>) {
        //Do something
    }
})

actorBus.EventBus.publish(typeMessage(<typeName>, <Object>))

FAQs

Package last updated on 02 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.