Created
June 21, 2014 11:01
-
-
Save alexeyraspopov/b93bd6bd0e9573dc9b5f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function SomeViewModel(title){ | |
this.title = data(title) | |
.map(toLowerCase); | |
this.description = event(node, 'change') | |
.map(getTargetValue) | |
.filter(Boolean); | |
this.full = computed(interpolate('$0: $1'), [this.title, this.description]); | |
} | |
function SomeViewModel(title){ | |
this.title = data(title) | |
.bind(map(toLowerCase)); | |
this.description = event(node, 'change') | |
.bind(map(getTargetValue)) | |
.bind(filter(Boolean)); | |
this.full = computed(interpolate('$0: $1'), [this.title, this.description]); | |
} | |
function SomeViewModel(title){ | |
this.title = data(title) | |
.bind(toLowerCase()); | |
this.description = event(node, 'change') | |
.bind(getTargetValue()) | |
.bind(isDefined()); | |
this.full = computed(interpolate('$0: $1'), [this.title, this.description]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment