simple-js-observer
v1.0.1
Published
Simple implementation of observer pattern
Downloads
92
Maintainers
Readme
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