({ n, type })
| 65 | } |
| 66 | |
| 67 | async function main({ n, type }) { |
| 68 | bench.start(); |
| 69 | let lineCount = 0; |
| 70 | |
| 71 | const iterable = readline.createInterface({ |
| 72 | input: getLoremIpsumStream(n), |
| 73 | }); |
| 74 | |
| 75 | const readlineIterable = type === 'old' ? oldWay.call(iterable) : iterable; |
| 76 | |
| 77 | // eslint-disable-next-line no-unused-vars |
| 78 | for await (const _ of readlineIterable) { |
| 79 | lineCount++; |
| 80 | } |
| 81 | bench.end(lineCount); |
| 82 | } |
nothing calls this directly
no test coverage detected