MCPcopy
hub / github.com/codeceptjs/CodeceptJS / countBy

Function countBy

lib/aria.js:202–207  ·  view source on GitHub ↗
(items)

Source from the content-addressed store, hash-verified

200}
201
202function countBy(items) {
203 return items.reduce((map, item) => {
204 map.set(item, (map.get(item) ?? 0) + 1)
205 return map
206 }, new Map())
207}
208
209// Bag diff: any summary appearing more in one bag than the other becomes added/removed.
210function diffSummaries(prev, curr) {

Callers 2

diffSummariesFunction · 0.85
formatDiffFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected