Releases: canjs/can-value
Releases · canjs/can-value
1.1.2
QUNIT2 upgrade
This updates the tests to use QUnit@2.x.x.
returnedBy( getter(lastSet) )
This adds the ability to set
observables returned by value.returnedBy
if they are passed a getter()
that takes an argument.
import {value} from "can";
var age = value.returnedBy(function(lastSet){
return lastSet == null ? 0 : +lastSet;
});
age.value //-> 0
age.value = "5";
age.value //-> 5
IE 11 Compatibility
v1.0.1
v1.0.0
can-value
makes it possible to create new observables:
- from any object or primitive value
- with the return value of a function (that updates when the observables inside it change)
- bound to a specific key in another observable
Find examples in the docs for can-value and each of its methods: bind, from, returnedBy, to, and with.