--- a/backbone.shard.js Wed Jun 22 13:36:10 2016 +0800
+++ b/backbone.shard.js Wed Jun 22 13:59:56 2016 +0800
// Underscore methods that take a property name as an argument.
-var attributeMethods = ['groupBy', 'countBy', 'sortBy'];
+var attributeMethods = ['countBy', 'groupBy', 'indexBy', 'sortBy'];
// Use attributes instead of properties.
_.each(attributeMethods, function(method) {
--- a/test/underscore-methods.js Wed Jun 22 13:36:10 2016 +0800
+++ b/test/underscore-methods.js Wed Jun 22 13:59:56 2016 +0800
return model.get('data').charCodeAt(0) % 2;
}), {0: [b], 1: [a, c]}, 'groupBy() works');
+ deepEqual(shard.indexBy('data'), {a: a, b: b, c: c}, 'indexBy() works');
var sh = shard.shuffle().reduce(function(memo, model) { return memo += model.get('data'); }, '');
ok(sh.length == 3 && _(sh).contains('a') && _(sh).contains('b') && _(sh).contains('c'), 'shuffle() works');