MCPcopy Create free account
hub / github.com/breck7/scroll / groupSort

Function groupSort

external/.d3.js:580–585  ·  view source on GitHub ↗
(values, reduce, key)

Source from the content-addressed store, hash-verified

578}
579
580function groupSort(values, reduce, key) {
581 return (reduce.length !== 2
582 ? sort(rollup(values, reduce, key), (([ak, av], [bk, bv]) => ascending$3(av, bv) || ascending$3(ak, bk)))
583 : sort(group(values, key), (([ak, av], [bk, bv]) => reduce(av, bv) || ascending$3(ak, bk))))
584 .map(([key]) => key);
585}
586
587var array$5 = Array.prototype;
588

Callers

nothing calls this directly

Calls 6

sortFunction · 0.85
rollupFunction · 0.85
ascending$3Function · 0.85
groupFunction · 0.85
mapMethod · 0.80
reduceFunction · 0.70

Tested by

no test coverage detected