Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

keneanung/nexus-event-bus

Repository files navigation

Repository archived. All code was moved to https://github.com/keneanung/nexus-scripts and lives on there. For more background, please read https://keneanung.github.io/nexus-scripts/blog/2023/06/23/_a_new_home.

Iron Realms Nexus Event Bus

An implementation of the publish-subscriber pattern at its core.

Installation

To install the package, first download it to your machine via this link.

You can then proceed to install it as a normal package into your Nexus profile. You may have to log in and out after installing the package.

Basic Usage

When the package is installed, you can use it in any script reflex. First you will need to subscribe to an event.

eventBus.subscribe('myEvent', (data) => {
  console.log(data);
});

To raise an event, you can use the raise method.

eventBus.raise('myEvent', 'Hello World!');

This will print Hello World! to the console.

For documentation on the inidividual methods, advanced usage and some best practices, see the Nexus Event Bus documentation.

About

Event bus/broker for the IRE Nexus client

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors 2

  •  
  •