Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@morgan-stanley/message-broker

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@morgan-stanley/message-broker

Framework agnostic messagebroker for decoupled communication.

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-92.86%
Maintainers
0
Weekly downloads
 
Created
Source

MessageBroker

Lifecycle Active NPM npm NPM Build Status OpenSSF Scorecard

MessageBroker provides framework agnostic, decoupled communication between publishers and subscribers. This library is fully type safe and works in both browsers and Node.js. MessageBroker is built ontop of RxJS providing access to observables and a comprehensive list of operators.

Full documentation can be found at https://morganstanley.github.io/message-broker/

Basic Usage

First, install the message-broker

npm install @morgan-stanley/message-broker

then you can start sending and receiving messages like this

import { messagebroker, IMessageBroker } from '@morgan-stanley/message-broker';

interface IContracts {
    myChannel: {
        payload: string;
    };
}

const broker: IMessageBroker<IContracts> = messagebroker<IContracts>();

broker.get('myChannel').subscribe((message) => {
    console.log(message.payload);
});

broker.create('myChannel').publish({
    payload: 'My first message using the MessageBroker!',
});

Development

For guidelines on how to contribute please click here. Here are a list of commands to run if you are interested in developing or contributing to the project.


npm install // Install all package dependencies.

npm run test // Run tests on the command line.

npm run watch-test // Run tests in watch mode.

npm run lint // Checks the code for lint errors.

npm run build // Run a simple build.

npm run watch-build // Run build in watch mode.

npm run build-release // Run a full build (Compile, Tests, Lint).

Keywords

FAQs

Package last updated on 06 Dec 2024

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc