Skip to content

hashemirafsan/bus-event

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bus-event

bus-event is a simple package for passing easily your event.

Installation

npm install bus-event

or

yarn add bus-event

Usage

Just import the package before start using it.

As a ES6 Module:

import BusEvent from 'bus-event';

Methods

Now here we have two methods to complete our work.

$emit(key, params)

When you will fire your event by bus event.

BusEvent.$emit('some_key', {
    // something 
})

$on(key, callback)

When you will receive your event by bus event.

BusEvent.$on('some_key', (e) => {
    // something
})

Bugs and Issues

If you encounter any bugs or issues, feel free to open an issue at github.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published