Skip to content

A simple javascript event manager with support for one-shot and late listeners.

Notifications You must be signed in to change notification settings

leahfitch/simple-events

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleEvents

Build Status

.on, .off, .once, etc. Have a look at the unit tests for usage examples.

Can be easily used as a mixin:

var SimpleEvents = require('simple-events')

var FooBar = function ()
{
    SimpleEvents.mixin(this)
}

var foobar = new FooBar()
foobar.on('stuff', function (x) { console.log(x + 10) })
foobar.emit('stuff', 10) // 20

Install

You can install using npm.

npm install @elishacook/simple-events

About

A simple javascript event manager with support for one-shot and late listeners.

Resources

Stars

Watchers

Forks

Packages

No packages published