MCPcopy Create free account
hub / github.com/TruthHun/BookStack / group

Function group

static/word2md/mammoth.browser.js:15998–16006  ·  view source on GitHub ↗
(obj, value, context, behavior)

Source from the content-addressed store, hash-verified

15996
15997 // An internal function used for aggregate "group by" operations.
15998 var group = function(obj, value, context, behavior) {
15999 var result = {};
16000 var iterator = lookupIterator(value || _.identity);
16001 each(obj, function(value, index) {
16002 var key = iterator.call(context, value, index, obj);
16003 behavior(result, key, value);
16004 });
16005 return result;
16006 };
16007
16008 // Groups the object's values by a criterion. Pass either a string attribute
16009 // to group by, or a function that returns the criterion.

Callers 1

mammoth.browser.jsFile · 0.70

Calls 3

lookupIteratorFunction · 0.70
cbFunction · 0.70
eachFunction · 0.50

Tested by

no test coverage detected