@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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.40latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.40
1.0.31
1.0.20
1.0.10
1.0.00

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