Skip to content

Instantly share code, notes, and snippets.

happysahota /
Created Aug 2, 2017 — forked from PurpleBooth/
A template to make good

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.


happysahota / pubSubDemo.js
Last active Jun 12, 2017
This is Demo for the PubSub design pattern
View pubSubDemo.js
/*PubSub Pattern*/
var pubSub = {
events: [],
on: function(eventName, fn) {[eventName] =[eventName] || [];[eventName].push(fn);