emitterProperty
.emitterProperty()
function()
Emitter property creates a Kefir property,
but then adds emitter.value
and emitter.error
methods that calls the
property's emitter object.
The end result is a single object that has methods of a stream, property and an attached emitter-like object.
var Kefir = require("can-kefir");
var age = Kefir.emitterProperty();
age.onValue(function(age){
console.log(age)
});
age.emitter.value(20) //-> logs 20
age.emitter.value(30) //-> logs 30
Returns
{undefined}
: