veams-plugin-vent
v1.0.2
Published
The VeamsVent plugin is a global publish and subscribe object. You can use this plugin to communicate between modules independently.
Downloads
14
Readme
VeamsVent Plugin
The VeamsVent plugin is a global publish and subscribe object. You can use this plugin to communicate between modules independently.
Veams exposes a global event object (Veams.EVENTS
) which can be used and extended by this plugin.
The module extends the default EVENTS
object of Veams when you pass the option called furtherEvents
.
How to
import Veams from 'veams';
import VeamsVent from 'veams/lib/plugins/vent';
import EVENTS from './custom-events';
// Intialize core of Veams
Veams.initialize();
// Add plugins to the Veams system
Veams.use(VeamsVent, {
furtherEvents: EVENTS
});
Options
- furtherEvents {
Object
} [false
] - Add your custom events to the global events object of Veams.