can.setKeyValue
Used by [can-reflect.settKeyValue can-reflect.setKeyValue] to set the stream's last emitted value
or error
. This symbol is only added to
emitterProperty objects.
emitterProperty[@@can.setKeyValue](key, value)
can-reflect.setKeyValue will use this function
to emit a value
or error
on the emitterProperty.
var Kefir = require("can-kefir");
var age = Kefir.emitterProperty();
age.onValue(function(value){
console.log(value)
});
canReflect.setKeyValue(age,"value",30) // logs 30
Parameters
- name
{String}
:Either
value
to emit value orerror
to emit errors. - value
{*}
:Any value to emit.