forked from LeenkxTeam/Kmake
9 lines
254 B
JavaScript
9 lines
254 B
JavaScript
module.exports = async function * customReporter(source) {
|
|
const counters = {};
|
|
for await (const event of source) {
|
|
counters[event.type] = (counters[event.type] ?? 0) + 1;
|
|
}
|
|
yield "package: reporter-cjs";
|
|
yield JSON.stringify(counters);
|
|
};
|