Skip to content
Myr

ipc-print-many.js

This file

Path

test/fixtures/ipc-print-many.js

12 lines · 386 bytes · JavaScript

Last changed by

Update dev dependencies (#1257)Sindre Sorhusbefore adoption5944b2d

History of this file

Take it

Debounce `message` events (#1087)ehmickybefore adoptione8bab97

lines 1–3why, one step back
1#!/usr/bin/env node
2import {argv} from 'node:process';3import {getOneMessage} from '../../index.js';

Update dev dependencies (#1257)Sindre Sorhusbefore adoption5944b2d

line 4why, one step back
4import {isAlwaysTrue} from '../helpers/ipc.js';

Debounce `message` events (#1087)ehmickybefore adoptione8bab97

lines 5–6why, one step back
5
6const count = Number(argv[2]);

Update dev dependencies (#1257)Sindre Sorhusbefore adoption5944b2d

line 7why, one step back
7const filter = argv[3] === 'true' ? isAlwaysTrue : undefined;

Debounce `message` events (#1087)ehmickybefore adoptione8bab97

lines 8–12why, one step back
8
9for (let index = 0; index < count; index += 1) {10 // eslint-disable-next-line no-await-in-loop11 console.log(await getOneMessage({filter}));12}