architecture-patterns
v0.2.0
Published
Software Architecture Patterns
Downloads
4
Readme
architecture-patterns
Software Architecture Patterns
- Observer
- Watcher
const Observer = require('architecture-patterns/observer');
const observer = new Observer();
observer.on('some_event', () => console.log('onEventCalled'));
observer.emit('some_event');
const Watcher = require('architecture-patterns/watcher');
const watcher = new Watcher(17);
watcher.watch(() => console.log('onUpdated'));
watcher.update(42);