UNPKG

electron-ipc-typesafe

Version:

A type-safe IPC (Inter-Process Communication) library for Electron applications with flexible handler registration

2 lines (1 loc) 404 B
"use strict";exports.getIpcApi=function(n="ipcApi"){try{if("undefined"==typeof window)return console.warn("IPC API not available - running in main process or Node.js context"),null;const o=window;let e=o[n];if(void 0===e){e=o[btoa(n)]}return void 0===e?(console.warn("IPC API not available - running outside Electron context"),null):e}catch(n){return console.error("Failed to access IPC API:",n),null}};