Skip to content

clifinger/pub-sub-pattern-js-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tests

Implement a Publish and Subscribe design pattern in JavaScript

Fork this repository and checkout using a branch pattern dev/your-name-here

Locate the file src/index.js and implement your basic pub-sub algorithm in EventBusFactory object.

const fire = (event, payload) => {
    // publish message here
};

const listen = (event, listener) => {
    // subscribe a message
};

const unsubscribe = (event, removeListener) => {
    // unsubscribe from event
};

Run test npm run test or npm test

Push your implementation to your branch name.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published