ievent

1.0.8 • Public • Published

Event

a very light JavaScript Event System

install

npm install ievent -S

usage

import iEvent from 'ievent'
 
iEvent.on("hello", (name, age) => {
  console.log("hello " + name + " age=" + age);
});
 
iEvent.on("hello", (name, age) => {
  console.log("hello " + name + " age=" + age + "...");
});
 
iEvent.once('hi',name=>{
  console.log('hi '+name)
})
 
// Event.off("hello");
 
iEvent.emit("hello", "flypie", 21);
 
iEvent.emit('hi','flypie')
 

Readme

Keywords

none

Package Sidebar

Install

npm i ievent

Weekly Downloads

1

Version

1.0.8

License

ISC

Last publish

Collaborators

  • flypie2