Skip to content
Myr

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 file

Take it

Add `result.ipc`/`error.ipc` (#1067)ehmickybefore adoption3ab34de

lines 1–5why, one step back
1#!/usr/bin/env node
2import process from 'node:process';3import {sendMessage, getEachMessage} from '../../index.js';4import {foobarString} from '../helpers/input.js';5

Debounce `message` events (#1087)ehmickybefore adoptione8bab97

lines 6–7why, one step back
6const iterable = getEachMessage();
7

Add `result.ipc`/`error.ipc` (#1067)ehmickybefore adoption3ab34de

lines 8–9why, one step back
8await sendMessage(foobarString);
9

Debounce `message` events (#1087)ehmickybefore adoptione8bab97

line 10why, one step back
10for await (const message of iterable) {

Add `result.ipc`/`error.ipc` (#1067)ehmickybefore adoption3ab34de

lines 11–16why, one step back
11 if (message === foobarString) {
12 break;13 }1415 process.stdout.write(`${message}`);16}