@potentii/electron-ipc-api

1.0.4 • Public • Published

Electron IPC API

NPM Version

Create and consume electron IPC APIs

Index


Installing

$ npm install @potentii/electron-ipc-api

Examples

Main process

import { IpcApiMain } from '@potentii/electron-ipc-api';

const myUsersDatabase = //...

IpcApiMain.process('user-by-id', async data => {    
    const userFound = await myUsersDatabase.find({ id: data.id });
    return userFound;    
});

Renderer process

import { IpcApiRenderer } from '@potentii/electron-ipc-api';

const userFound = await IpcApiRenderer.send('user-by-id', { id: '1234' });

License

MIT

Package Sidebar

Install

npm i @potentii/electron-ipc-api

Weekly Downloads

1

Version

1.0.4

License

MIT

Unpacked Size

14 kB

Total Files

10

Last publish

Collaborators

  • potentii