UNPKG

498 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.emit = void 0;
4const Debug = require("debug");
5const debug = Debug('ionic:lib:events');
6function emit(event, data) {
7 if (!process.send) {
8 debug('No process.send, not emitting event %s', event);
9 return false;
10 }
11 const msg = { type: 'event', event, data };
12 process.send(msg);
13 debug('Sent event %s as IPC message to parent process', event);
14 return true;
15}
16exports.emit = emit;