Skip to content
Myr

ipc-print-many-each.js

This file

Path

test/fixtures/ipc-print-many-each.js

14 lines · 460 bytes · JavaScript

Last changed by

Require Node.js 22 (#1243)Sindre Sorhusbefore adoption04b4454

History of this file

Take it

Debounce `message` events (#1087)ehmickybefore adoptione8bab97

lines 1–10why, one step back
1#!/usr/bin/env node
2import {argv} from 'node:process';3import {getEachMessage} from '../../index.js';45const count = Number(argv[2]);67for (let index = 0; index < count; index += 1) {8 // eslint-disable-next-line no-await-in-loop, no-unreachable-loop9 for await (const message of getEachMessage()) {10 console.log(message);

Require Node.js 22 (#1243)Sindre Sorhusbefore adoption04b4454

line 11why, one step back
11 // eslint-disable-next-line unicorn/no-break-in-nested-loop -- breaks only the inner loop, the outer loop must continue

Debounce `message` events (#1087)ehmickybefore adoptione8bab97

lines 12–14why, one step back
12 break;
13 }14}