Nimble Polyglot Microcosm

    message-dispatcher

    0.1.0 • Public • Published

    Message Script / Message Dispatcher

    A dispatcher and a mailbox implementation for controlled and strictly ordered message distribution.

    Install

    npm install message-dispatcher
    

    Usage

    import { MessageDispatcher, Mailbox, Message } from 'message-dispatcher';
     
    const dispatcher = new MessageDispatcher();
    const mailbox = dispatcher.mailboxOf(Mailbox);
     
    mailbox.register(message => /* some routine */);
    dispatcher.dispatch(new Message());

    What's inside

    import {
      MessageDispatcher,
      Mailbox,
      Message,
      Envelope
    } from 'message-dispatcher';

    Keywords

    none

    Install

    npm i message-dispatcher

    DownloadsWeekly Downloads

    2

    Version

    0.1.0

    License

    MIT

    Last publish

    Collaborators

    • alexeyraspopov