event-emmiter

1.0.4 • Public • Published

Eventjs

Document

Get start

you must have been installed node and npm for continue

first install with
  • npm
npm i event-emmiter
  • or use yarn
yarn add event-emmiter
second step is importing this library
  • es5
const Eventjs = require("event-emmiter")
  • or es6+ and ts
import Eventjs from "event-emmiter"
now you must create new instance of a class do you has import
const eventer = new Eventjs
now you can use this object eventer to emmit and recive events
// the method on create an listner 
eventer.on('event',(message)=>{
    console.log(message)
})

/*the method emmit send an message and
dispare the callback function passed an 
method on*/
eventer.emmit('event',"Welcomme")
//you can test its

Package Sidebar

Install

npm i event-emmiter

Weekly Downloads

2

Version

1.0.4

License

MIT

Unpacked Size

2.68 kB

Total Files

4

Last publish

Collaborators

  • rafaelfl