@arpinum/messaging
TypeScript icon, indicating that this package has built-in type declarations

4.0.4 • Public • Published

@arpinum/messaging Build Status

Life is a little like a message in a bottle, to be carried by the winds and the tides.
Gene Tierney

@arpinum/messaging contains a simple message bus.

Installation

npm install @arpinum/messaging --save

Example

import { createMessageBus } from "@arpinum/messaging";

const bus = createMessageBus();
bus.register("PrintText", (message) => console.log(message.payload));
bus.post({ type: "PrintText", payload: "Hello world" }).catch(console.error);

Docs

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i @arpinum/messaging

Weekly Downloads

50

Version

4.0.4

License

MIT

Unpacked Size

15.9 kB

Total Files

13

Last publish

Collaborators

  • michaelborde