Skip to content

Small library for creating custom events in JavaScript

Notifications You must be signed in to change notification settings

fullstackdb/eventEmitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tiny Event Emitter

A small library that adds possibility to create custom events.

Event system can make your Javascript Applications more flexible and your data flow more predictable.

Build Status

Installation

npm install tiny-event-emitter

Usage

var event = Event.default();

// subscribe to event `try` and work with data
event.when('try', (data) => {
    console.log('try', data);
})

// emit event `try` with some data that you want to work with
event.emit('try', { hasDone: true } )

Tests

npm test

Contributing

In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

About

Small library for creating custom events in JavaScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published