x-observable
v1.0.0
Published
Observable value class.
Downloads
2
Maintainers
Readme
Observable
Observable is a JavaScript library providing observable value implementation.
Examples
var Observable = require('x-observable');
var observable = new Observable(1);
observable.changed.addListener(function(newValue, oldValue) {
// newValue = 2, oldValue = 1
});
observable.setValue(2);
Method aliases
getValue - get.
setValue - set.
Installation
npm install --save x-observable