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 fileTake it
12345678910111213#!/usr/bin/env nodeimport {argv} from 'node:process';import {getOneMessage} from '../../index.js';import {isAlwaysTrue} from '../helpers/ipc.js';
const count = Number(argv[2]);const filter = argv[3] === 'true' ? isAlwaysTrue : undefined;
for (let index = 0; index < count; index += 1) { // eslint-disable-next-line no-await-in-loop console.log(await getOneMessage({filter}));}