Skip to content

Latest commit

 

History

History
30 lines (19 loc) · 735 Bytes

README.md

File metadata and controls

30 lines (19 loc) · 735 Bytes

@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