1.0.0-alpha • Published 4 years ago
statefulobjects v1.0.0-alpha
statefulObjects
Plain objects that can have callbacks subscribed to their properties.
Usage
var q = statefulObject( { foo : 'bar', widgets : 'doodads' } );
q.foo; // 'bar'
q.subscribe.foo( 'hello', () => alert(q.foo) );
q.foo = 'blah'; // alerts 'blah'
// to remove callback
q.unsubscribe.foo( 'hello' );