ipc-iterate-print.js
This file
Path
test/fixtures/ipc-iterate-print.js
16 lines · 362 bytes · JavaScript
Last changed by
Debounce `message` events (#1087)ehmickybefore adoptione8bab97
History of this fileTake it
Add `result.ipc`/`error.ipc` (#1067)ehmickybefore adoption3ab34de
lines 1–5why, one step back1#!/usr/bin/env node2import process from 'node:process';3import {sendMessage, getEachMessage} from '../../index.js';4import {foobarString} from '../helpers/input.js';5Debounce `message` events (#1087)ehmickybefore adoptione8bab97
lines 6–7why, one step back6const iterable = getEachMessage();7Add `result.ipc`/`error.ipc` (#1067)ehmickybefore adoption3ab34de
lines 8–9why, one step back8await sendMessage(foobarString);9Debounce `message` events (#1087)ehmickybefore adoptione8bab97
line 10why, one step back10for await (const message of iterable) {Add `result.ipc`/`error.ipc` (#1067)ehmickybefore adoption3ab34de
lines 11–16why, one step back11 if (message === foobarString) {12 break;13 }1415 process.stdout.write(`${message}`);16}