evte
v0.0.1
Published
A node module to event things :D
Downloads
6
Readme
Evte
Evte is a node module to help you to create events very easy
Evte isn't a advanced node module, is a simple node module to help you to..... events :D
Let's get started
You need to install first using this command :
npm i evte
After that, you need to require the module
var evte = require('evte')
var eventEmitter = new evte.eventEmitter()
Done.
Creating and using a event
To create a event (Syntax) :
eventEmitter.on(nameOfTheEvent, callback)
For example:
eventEmitter.on('test', () => {
console.log('Work!')
})
To use a event, you need to do this :
eventEmitter.emit(what?)
For example:
I have this event :
eventEmitter.on('test', () => {
console.log('Work!')
})
And to use I do this:
eventEmitter.emit('test')
Enjoy using evte!