Skip to content

Instantly share code, notes, and snippets.

@happysahota
happysahota / README-Template.md
Created Aug 2, 2017 — forked from PurpleBooth/README-Template.md
A template to make good README.md
View README-Template.md

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.

Prerequisites

@happysahota
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) {
this.events[eventName] = this.events[eventName] || [];
this.events[eventName].push(fn);
},