simple-js-observer Simple implementation of observer pattern const Publisher = require('simple-js-observer'); let pub = new Publisher; function sub(message){ console.log(message) } sub.subscribe(pub); // Subscribing pub.send("Hello!") // Publishing