x-observable

1.0.0 • Public • Published

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

Package Sidebar

Install

npm i x-observable

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • lexarx