This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

bbus

1.0.1 • Public • Published

Bbus

Event Message Bus

How to use

// main.js
import { default as bbus } from 'bbus'

bbus.on('SAY_SOMETHING', (message) => { console.log(message) })
// calls.js
import { default as bbus } from 'bbus'

bbus.emit('SAY_SOMETHING', 'Hello, world!')

Unsubscribe

// main.js
import { default as bbus } from 'bbus'

bbus.off('SAY_SOMETHING', *reference_for_function*)

ES5

You can use require() syntax too:

// main.js
const bbus = require('./bbus.js');

bbus.on('SAY_SOMETHING', (message) => { console.log(message) })

Package Sidebar

Install

npm i bbus

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

3.96 kB

Total Files

5

Last publish

Collaborators

  • henriquegogo