Commit 68a2c2fb authored by Gilad Peleg's avatar Gilad Peleg

reduce redundant filter & without syntax

parent 81d044dc
......@@ -18,14 +18,12 @@ var app = app || {};
// Filter down the list of all todo items that are finished.
completed: function () {
return this.filter(function (todo) {
return todo.get('completed');
});
return this.where({completed:true});
},
// Filter down the list to only todo items that are still not finished.
remaining: function () {
return this.without.apply(this, this.completed());
return this.where({completed:false});
},
// We keep the Todos in sequential order, despite being saved by unordered
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment