Skip to content

Instantly share code, notes, and snippets.

@GirlBossRush
Created February 21, 2014 04:14
Show Gist options
  • Save GirlBossRush/9128614 to your computer and use it in GitHub Desktop.
Save GirlBossRush/9128614 to your computer and use it in GitHub Desktop.
var removedItems = { completed: 0, skipped: 0 };
_.each(MemoryBank.items, function (item) {
if (item.memories.completed) {
removedItems.completed++;
delete MemoryBank.items[item.id];
}
if (item.memories.skipped) {
removedItems.skipped++;
delete MemoryBank.items[item.id];
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment