subject-matter
v0.1.0
Published
**Subject Matter** provides a simple subject for the observer pattern.
Downloads
3
Readme
Subject Matter provides a simple subject for the observer pattern.
import Subject from 'subject-matter';
const s = new Subject(0);
const unsubscribe = s.subscribe(v => console.log('value is', v));
s.update(1); // Outputs "value is 1" to the console.
unsubscribe();
s.update(2); // Does nothing.