export default async function * customReporter(source) {
  const counters = {};
  for await (const event of source) {
    counters[event.type] = (counters[event.type] ?? 0) + 1;
  }
  yield "package: reporter-esm";
  yield JSON.stringify(counters);
};
