evte

0.0.1 • Public • Published

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!

Readme

Keywords

Package Sidebar

Install

npm i evte

Weekly Downloads

1

Version

0.0.1

License

ISC

Unpacked Size

1.81 kB

Total Files

5

Last publish

Collaborators

  • andrew221