1.0.1 • Published 6 years ago
simple-js-observer v1.0.1
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