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
df820b52
Commit
df820b52
authored
Aug 17, 2014
by
oak-tree
Committed by
Sindre Sorhus
Aug 17, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Close GH-974: no using underscore -> no last() on collection..
parent
e3d28cb2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
labs/architecture-examples/exoskeleton/js/collections/todos.js
...architecture-examples/exoskeleton/js/collections/todos.js
+5
-0
No files found.
labs/architecture-examples/exoskeleton/js/collections/todos.js
View file @
df820b52
...
...
@@ -26,6 +26,11 @@ var app = app || {};
return
this
.
where
({
completed
:
false
});
},
// Return last item on list if any. Otherwise return null.
last
:
function
()
{
return
this
.
length
>
0
?
this
.
at
(
this
.
length
-
1
)
:
null
;
},
// We keep the Todos in sequential order, despite being saved by unordered
// GUID in the database. This generates the next order number for new items.
nextOrder
:
function
()
{
...
...
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