Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
todomvc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eugene Shen
todomvc
Commits
c81b9d1a
Commit
c81b9d1a
authored
Jun 28, 2014
by
Gilad Peleg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reduce redundant filter & without syntax
parent
4acb4d47
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
dependency-examples/backbone_require/js/collections/todos.js
dependency-examples/backbone_require/js/collections/todos.js
+2
-4
No files found.
dependency-examples/backbone_require/js/collections/todos.js
View file @
c81b9d1a
...
...
@@ -16,14 +16,12 @@ define([
// 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
.
w
ithout
.
apply
(
this
,
this
.
completed
()
);
return
this
.
w
here
({
completed
:
false
}
);
},
// We keep the Todos in sequential order, despite being saved by unordered
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment