UNPKG

kafkajs

Version:

A modern Apache Kafka client for node.js

10 lines (8 loc) 218 B
/** * @param {number} count * @param {(index: number) => T} [callback] * @template T */ const seq = (count, callback = x => x) => new Array(count).fill(0).map((_, index) => callback(index)) module.exports = seq