Skip to content

Instantly share code, notes, and snippets.

@ruprict
Created December 9, 2012 16:17
Show Gist options
  • Save ruprict/4245859 to your computer and use it in GitHub Desktop.
Save ruprict/4245859 to your computer and use it in GitHub Desktop.
this.allLinks = ko.observableArray();
this.lickedLinks = ko.computed(function() {
return this.allLinks().filter(function(link) {
return link.isLicked();
});
}, this);
this.newLinks = ko.computed(function() {
return this.allLinks().filter(function(link) {
return !link.isLicked();
});
}, this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment