setValue
Set the value of a mutable object.
setValue(obj, value)
Set the value of a Value-like object obj to the value value. obj must implement
@@can.setValue to be used with canReflect.setValue.
Map-like objects may want to implement @@can.setValue to merge objects of properties
into themselves.
var compute = canCompute("foo");
var plain = {};
canReflect.setValue(compute, "bar");
compute(); // -> bar
canReflect.setValue(plain, { quux: "thud" }); // throws "can-reflect.setValue - Can not set value."
Parameters
- obj
{Object}:the object to set on
- value
{*}:the value to set for the object