MCPcopy Index your code
hub / github.com/Macuyiko/minecraft-python / group

Function group

ServerEditorWeb/ace/worker-javascript.js:1604–1614  ·  view source on GitHub ↗
(behavior)

Source from the content-addressed store, hash-verified

1602 }), 'value');
1603 };
1604 var group = function(behavior) {
1605 return function(obj, iterator, context) {
1606 var result = {};
1607 iterator = lookupIterator(iterator);
1608 each(obj, function(value, index) {
1609 var key = iterator.call(context, value, index, obj);
1610 behavior(result, key, value);
1611 });
1612 return result;
1613 };
1614 };
1615 _.groupBy = group(function(result, key, value) {
1616 _.has(result, key) ? result[key].push(value) : result[key] = [value];
1617 });

Callers 1

Calls 2

lookupIteratorFunction · 0.85
eachFunction · 0.85

Tested by

no test coverage detected