0.0.7 • Published 7 years ago

@jdw/blabbermouth v0.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

Blabbermouth

Lightweight asynchronous message passing for NodeJS.

Quick Start

npm i -save @jdw/blabbermouth
// es6
import { Blabbermouth } from '@jdw/blabbermouth';

// or es5...
const Blabbermouth = require('@jdw/blabbermouth').Blabbermouth;

const bm = new Blabbermouth();

// A quick pub-sub example
bm.createTopic({
    id: 'topic.id',
    description: 'Give the topic an extended description',
   })
  .register('topic.id', async (topicId, event) => {
      const { content, uuid, date } = event;
      console.log(content.message);
  })
  .publish(
    'topic.id',
    { message: 'Asynchronous messaging in action!' }
  );

The above example will produce the following message "Asynchronous messaging in action!" on your command line.

Contributing

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago