toStreamFromProperty
Creates a stream on a {Observable} object that gets updated whenever the property value on the observable changes.
canStream.toStreamFromProperty( obs, propName )
Creates a stream based on property value change on observable
var map = {
foo: "bar"
};
var stream = canStreaming.toStreamFromProperty(map, 'foo');
stream.onValue(function(value){
console.log(value); // -> foobar
});
map.foo = "foobar";
Parameters
- An
{Observable}
:observable object
- property
{String}
:name
Returns
{Stream}
:
A stream.